ARTICLE AD BOX
I have to create andoid app with maui .net 9.0 and I have to use old tablet with cpu 32bit.
Tablet details: 2018, Android Version 10, API 29, Java VM ART 2.1.0, Kernel architecture armv8l, armeabi-7a/armeabi.
I added these rows into csproj file application: is correctly downloaded into tablet:
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">android-arm;android-arm64;android-x64</RuntimeIdentifiers>
This is csproj file:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net9.0-android;net9.0-ios18.0;net9.0-maccatalyst18.0;net9.0- windows10.0.19041.0</TargetFrameworks> <RuntimeIdentifiers Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">android-arm;android-arm64;android-x64</RuntimeIdentifiers> <OutputType>Exe</OutputType> <RootNamespace>GestMagazzino</RootNamespace> <UseMaui>true</UseMaui> <SingleProject>true</SingleProject> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> <!-- Display name --> <ApplicationTitle>AppTest</ApplicationTitle> <!-- App Identifier --> <ApplicationId>com.companyname.apptest</ApplicationId> <!-- Versions --> <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion> <ApplicationVersion>1</ApplicationVersion> <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion> <TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion> <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion> <NullabilityInfoContextSupport>true</NullabilityInfoContextSupport> <AndroidPackageFormat>apk</AndroidPackageFormat> <AndroidFastDeployment>false</AndroidFastDeployment> <AndroidMinSdkVersion>29</AndroidMinSdkVersion> <AndroidTargetSdkVersion>35</AndroidTargetSdkVersion> <RunAOTCompilation>false</RunAOTCompilation> <PublishTrimmed>false</PublishTrimmed> <ImplicitlyUseAndroidAppBundle>false</ImplicitlyUseAndroidAppBundle> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net9.0-android|AnyCPU'"> <AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi> <TrimMode>copyused</TrimMode> <EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-android|AnyCPU'"> <AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi> <TrimMode>copyused</TrimMode> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <AndroidSupportedAbis>armeabi-v7a</AndroidSupportedAbis> <UseInterpreter>false</UseInterpreter> <AndroidFastDeployment>false</AndroidFastDeployment> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <AndroidSupportedAbis>armeabi-v7a</AndroidSupportedAbis> </PropertyGroup> <ItemGroup> <!-- App Icon --> <MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" /> <!-- Splash Screen --> <MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" /> <!-- Images --> <MauiImage Include="Resources\Images\*" /> <MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" /> <MauiImage Update="Resources\Images\loading1.png"> <CopyToOutputDirectory>Never</CopyToOutputDirectory> </MauiImage> <!-- Custom Fonts --> <MauiFont Include="Resources\Fonts\*" /> <!-- Raw Assets (also remove the "Resources\Raw" prefix) --> <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" /> </ItemGroup> <ItemGroup> <None Remove="Config.json" /> <None Remove="Platforms\Android\Res\xml\nfc_tech_filter.xml" /> </ItemGroup> <ItemGroup> <AndroidResource Include="Platforms\Android\Res\xml\nfc_tech_filter.xml"> <CopyToOutputDirectory>Never</CopyToOutputDirectory> </AndroidResource> </ItemGroup> <ItemGroup> <MauiAsset Include="Config.json"> <CopyToOutputDirectory>Never</CopyToOutputDirectory> </MauiAsset> </ItemGroup> <ItemGroup> <PackageReference Include="Camera.MAUI.ZXing" Version="1.0.0" /> <PackageReference Include="CommunityToolkit.Maui" Version="12.2.0" /> <PackageReference Include="Microsoft.Maui.Controls" Version="9.0.90" /> <PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" /> <PackageReference Include="MySql.Data" Version="9.3.0" /> <PackageReference Include="ZXing.Net.Maui.Controls" Version="0.4.0" /> </ItemGroup> <ItemGroup> <MauiXaml Update="CameraView.xaml"> <Generator>MSBuild:Compile</Generator> </MauiXaml> <MauiXaml Update="ConfigPage.xaml"> <Generator>MSBuild:Compile</Generator> </MauiXaml> <MauiXaml Update="Controls\LoadingOverlay.xaml"> <Generator>MSBuild:Compile</Generator> </MauiXaml> <MauiXaml Update="ListMovements.xaml"> <Generator>MSBuild:Compile</Generator> </MauiXaml> <MauiXaml Update="LoadUnloadBag.xaml"> <Generator>MSBuild:Compile</Generator> </MauiXaml> <MauiXaml Update="Signature.xaml"> <Generator>MSBuild:Compile</Generator> </MauiXaml> <MauiXaml Update="Stock.xaml"> <Generator>MSBuild:Compile</Generator> </MauiXaml> </ItemGroup> <ItemGroup Condition="'$(TargetFramework)' == 'net9.0-android35.0'"> <PackageReference Include="Plugin.Maui.CurrentActivity"> <Version>1.0.0.61</Version> </PackageReference> </ItemGroup> </Project>With this code I can download app into tablet if I connect tablet to pc but I need to create apk file to install app because usually I can't connect tablet to my pc.
If I use apk file application is not installed and I haven't log file with error.
I have tried to install with adb but I have this error:
C:\>"C:\Program Files (x86)\Android\android-sdk\platform-tools\adb" install "C:\Program Files (x86)\Android\android-sdk\platform-tools\com.companyname.apptest.apk"
Performing Streamed Install
adb: failed to install C:\Program Files (x86)\Android\android-sdk\platform-tools\com.companyname.apptest.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /d
ata/app/vmdl410107144.tmp/base.apk: Attempt to get length of null array]
Is it possible to check apk file to know because from visual studio work but apk file doesn't work?
Regards
