Click here to Skip to main content
14,696,499 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've recently updated my Visual Studio Community 2019 to version 16.7.5. Since the update i can't create an APK with the archive manager, i get the error "Cannot create the archive file because the packaging process failed". In the previous version of VS this worked just fine.

Now if i change the csproj file to this:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <SelectedDevice>Zebra Technologies MC33</SelectedDevice>
    <AndroidDesignerPreferredDevice>Nexus S</AndroidDesignerPreferredDevice>
    <DefaultDevice>VisualStudio_android-23_arm_phone</DefaultDevice>
    <AndroidDesignerPreferredTheme>AppTheme</AndroidDesignerPreferredTheme>
    <DebugSymbols>false</DebugSymbols>
    <DebugType>portable</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AndroidManagedSymbols>true</AndroidManagedSymbols>
    <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
    <AndroidLinkMode>Full</AndroidLinkMode>
    <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
    <AndroidSupportedAbis>armeabi-v7a;x86;x86_64;arm64-v8a</AndroidSupportedAbis>
    <AotAssemblies>true</AotAssemblies>
    <EnableLLVM>false</EnableLLVM>
    <BundleAssemblies>false</BundleAssemblies>
    <AndroidEnableMultiDex>true</AndroidEnableMultiDex>
    <AndroidEnableProfiledAot>true</AndroidEnableProfiledAot>
  </PropertyGroup>
</Project>


With this I can build the apk and install it on a device. The problem is that the app crashes wherever it uses mysql. It seems it doesn't connect to the database.

If i debug the app on a device it works just fine, the problem only appears on the apk file.

Any help would be much appreciated

What I have tried:

unninstall and install nuget for mysql
Posted
Updated 9-Oct-20 14:27pm
v2
Comments
Gerry Schmitz 9-Oct-20 19:48pm
   
Sounds like your "APK" is mssing a MySql component / setting.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900