惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
H
Help Net Security
雷峰网
雷峰网
V
Visual Studio Blog
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
IT之家
IT之家
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
月光博客
月光博客
A
About on SuperTechFans
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale

博客园 - 广交天下好友

给 IIS 配置 HTTPS MAUI 运行环境注意事项 MQTT项目应用 MQTT 网络方面小知识 电脑小知识 Redis操作篇 Modbus 软件安装注册码 wpf 关闭热重载 重装vs2022 nuget添加包报错: Unexpected character encountered while parsing value: �. Path '', line 0, position 0. WPF 踩过的坑 vs2019 未能加载文件或程序集“System.Data.SQLite”或它的某一个依赖项。试图加载格式不正确的程序。 sql 备忘录 Excel 其它操作 护眼颜色调整 练习第一篇 Python Requests使用 第一篇 C#模拟http请求抓取数据 asp.net webService添加头文件验证 好文记录地址 关于邮件发送和邮件附件接收方面 sql 查询时间当前时间少7天 20190729研究和学习篇 C# Timer同步和异步使用 马肯9450命令回传 上海公积金社保业务办理
maui发布安卓系统
广交天下好友 · 2026-09-08 · via 博客园 - 广交天下好友

image

image

 找到本机安装的sdk和jdk位置发布apk文件,直接安装到手机上

D:\Program Files (x86)\Microsoft Visual Studio\Shared\Android\openjdk\jdk-17.0.14

D:\Program Files (x86)\Microsoft Visual Studio\Shared\Android\android-sdk

 
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <IsFirstTimeProjectOpen>False</IsFirstTimeProjectOpen>
    <ActiveDebugFramework>net9.0-android</ActiveDebugFramework>
    <ActiveDebugProfile>Pixel 7 - API 35 (Android 15.0 - API 35)</ActiveDebugProfile>
    <SelectedPlatformGroup>Emulator</SelectedPlatformGroup>
    <DefaultDevice>pixel_7_-_api_35</DefaultDevice>
    <AndroidSdkDirectory>D:\Program Files (x86)\Microsoft Visual Studio\Shared\Android\android-sdk</AndroidSdkDirectory>
    <JavaSdkDirectory>D:\Program Files (x86)\Microsoft Visual Studio\Shared\Android\openjdk\jdk-17.0.14</JavaSdkDirectory>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net9.0-android|AnyCPU'">
    <DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
  </PropertyGroup>
  <ItemGroup>
    <None Update="App.xaml">
      <SubType>Designer</SubType>
    </None>
    <None Update="AppShell.xaml">
      <SubType>Designer</SubType>
    </None>
    <None Update="MainPage.xaml">
      <SubType>Designer</SubType>
    </None>
    <None Update="Platforms\Windows\App.xaml">
      <SubType>Designer</SubType>
    </None>
    <None Update="Platforms\Windows\Package.appxmanifest">
      <SubType>Designer</SubType>
    </None>
    <None Update="Resources\Styles\Colors.xaml">
      <SubType>Designer</SubType>
    </None>
    <None Update="Resources\Styles\Styles.xaml">
      <SubType>Designer</SubType>
    </None>
  </ItemGroup>
</Project>
xxxApp.csproj.user文件配置 设置了AndroidSdkDirectory 和 JavaSdkDirectory参数值 发布安卓版本不需要每次都指定sdk和jdk

<AndroidSdkDirectory>D:\Program Files (x86)\Microsoft Visual Studio\Shared\Android\android-sdk</AndroidSdkDirectory> <JavaSdkDirectory>D:\Program Files (x86)\Microsoft Visual Studio\Shared\Android\openjdk\jdk-17.0.14</JavaSdkDirectory>

image

发布后.apk 到微信上,使用浏览器进行安装,或者改后缀,把.1后缀去掉

image