[INSTALL_FAILED_INVALID_APK]Base.apk is missing with Xamarin.Forms

Viewed 6959

Not sure if this is the correct place for this but I have no idea what is happening.

I have installed Visual Studio, selected the Xamarin.Form development option. I then created a blank app called AwesomeApp. When I create ANY android simulator, I get the below error:

ADB0010: Deployment failed Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_INVALID_APK: Package couldn't be installed in /data/app/com.companyname.awesomeapp-n7s-TVkN9lE8v1nea3tFZg==: Package /data/app/com.companyname.awesomeapp-n7s-TVkN9lE8v1nea3tFZg==/base.apk code is missing]

Has anyone experience this or even found a way around this? Following the suggestions only, such as cleaning the project, solution and rebuilding are not working. This happens with any project, no matter of the name or naming convention (i.e AwesomeApp or awesomeapp)

2 Answers

For me it's fixed by changing Dex Compiler from dx to d8 and disabling Shared Mono Runtime & Multi Dex

Upd: A bit late but disabling Shared Mono Runtime is optional. Found out that it also works with it.

Try setting your project back to the current recommended defaults. Remove all of the following properties from the .csproj file:

  • AndroidEnableMultiDex
  • AndroidDexGenerator
  • AndroidLinkTool
  • AndroidDexTool

This will let Xamarin.Android pick the current latest default values.

Related