Android Emulator For Xamarin On Execution Failed After Closing

After finishing release build of your Android application with Xamarin – Visual Studio 2019 you may experience the following error when uploading the app to Google Play Console:

Mar 31, 2021 After you have configured the Android Emulator, see Debugging on the Android Emulator for information about how to launch the emulator and use it for testing and debugging your app. Note As of Android SDK Tools version 26.0.1 and later, Google has removed support for existing AVD/SDK managers in favor of their new CLI (Command Line Interface.

Android Emulator For Xamarin On Execution Failed After Closing
  • It was way too slow, unresponsive, and stall Visual Studio into a busy/wait state that require abrupt termination of the devenv.exe process even after closing the emulator. That was the short summarised story; the long story with all the details and errors was submitted in another post (24 Oct) which for some reason got stuck in some moderation.
  • Apr 02, 2020 @JonDouglas that does appear to be related. I tried File - New Project with a Xamarin.Forms blank page app, I was able to deploy to the emulator without any issues. With the existing project I experienced this on before, I rolled back to the commit before my fix, these are the current settings - this does not deploy.

Even when your application contains ARM and ARM64, it might still happen that Google refuses to accept your app and returns just the same error message.

The reason is simple: Google requires that your app with native code bundled as AAB (which is ZIP) contains also libraries for 64-bit platform. It does not matter which architecture.

The error is often caused by building application also for Intel platform because emulators on Intel are faster. There are two options to resolve the issue:

  • remove Intel platform from release build
  • add also 64-bit version for Intel platform to release build

Google is checking each platform and your .so files should be mirrored for 32-bit and 64-bit. If your bundle is not consistent then Google will refuse your application.

To fix this problem open Visual Studio 2019. Click your project in Solution Explorer. Open Properties (ALT+Enter).

Click Android Options, scroll down to Advanced button. Click Advanced button.

Uncheck all Intel platform (or check them all, based on your preference) and click Close.

Press CTRL+S to save changes. Wineskin per mac. Create a new archive of your application (menu Build – Archive…)

Upload the new AAB.

If you don’t know how to switch to AAB, just go back to Android Options. Search for Android Package Format and select ‘bundle’.

When I try to run an Android emulator, I get the following error screen. The same occurs when I export the apk. When I go to the directory where the apk will be saved, the apk file is not there.

Thank you,
christophe

Answers:

I had the same issue, this problem will be fixed by doing the below step.

Go to

File->Setting->Gradle->Gradle Vm Option

For Android Studio 1.2

File->Setting->Build, Deployment &Execution->Build Tools->Gradle->Gradle Vm Option

, Now put this value -Xmx256m in the box, and hit the Apply button.

Answers:
  1. Click “Gradle Console” for the log from Gradle.
  2. Debug from the error messages
    • Mac: In Android Studio, go to:
      • “Preference”
      • “Build, Execution, Deployment”
      • “Compiler”
      • Add “–stacktrace” to “Command-line Options”

Note the error will usually be listed as the first line (improperly formatted for Android Studio Gradle console such as:

AGPBI: {“kind”:”error”,”text”:”Float types not allowed (at u0027icon_alpha_activeu0027 with value u00270.75u0027).”,”sources”:[{“file”:”/Users/mingsheng/path/to/my/errenous/integers.xml”,”position”:{“startLine”:5,”startColumn”:38,”startOffset”:272,”endColumn”:42,”endOffset”:276}}],”original”:””}

Where “text” = error message, “sources: file” = errenous filepath/name

In this example, I have entered a Float value in the integers file.

Answers:

This dialog box with empty cause also comes when there is some error in your resource(res) directory. Check for any error in layout files etc.

Answers:

I had this issue too. It caused by mistake in dimens.xml (git helps me found it).

I used

<dimen name='map_search_view_top_margin'>100</dimen>

instead

<dimen name='map_search_view_top_margin'>100dp</dimen>

Hope it helps.

Answers:

This is a mistake somewhere in your xml files.
Check

Something wrong with opening closing bracket or something you missed in these files. Lma manager 2007 pc download free full version.

Answers:

Honestly speaking, to me none of the above solutions worked and i almost fought over this for 3 days. Finally ultimate solution was to backup my project, uninstall studio and its trace files completely, clear files from temp, %temp% and prefetch folders and then reinstall all over again and finally it worked.

Pls discard my above answer which i taught was one of the solutions. I faced this problem repeatedly because 1 of my teammate forgot to include git.ignore file while pushing code to bitbucket and everytime i used to pull that code and then gradle used to pop the above problem. And after figuring out that, i have added proper git.ignore file and now there’s no any problem on any1’s pc 🙂

Answers:

I am often getting that error when I have a typo in my xml. Open the gradle console and scroll up to the first red lines that appear. It will tell you the exact problem.

Answers:

I have this problem, too. I used Gradle v.1.3.1 but Android Studio version is v1.2.2. Just update Android Studio to v.1.3.2 solved my problem.

Answers:

In my case the root of the problem was, I deleted some resources that some xml files were refering to, and in that case neither of “Clear Project” “Rebuild Project” “Gradle VM Option” or “deleting .gradle folder” helped at all.

What more to say is, none of the mentioned xml files were in use, and no error was displayed anywhere. I only detected the problem when (in desperate) sync’ed Gradle, and then opened the Gradle console and scrolled up and read the red error lines.

Answers:
EmulatorAndroid Emulator For Xamarin On Execution Failed After Closing

None of the solutions worked for me. So I found this solution here:

Android Emulator For Xamarin On Execution Failed After Closing Time

My Android Studio was using JDK 1.8, so I switched back to JDK 1.7 and now it is working!

Go to

File > Project Structure > SDK Location

I had JDK Location set as jdk1.8.0_05. I just changed it to jdk1.7.0_79 and everything works fine now.

Answers:

I had the same issue. After an hour of struggle, it’s finally fixed.

First I updated Android Studio to 1.3.2. That did not fix the problem immediately, but at least it gave a proper error when trying to run the application.

(for me, there was something wrong with JAR dependencies so I removed them and it’s running now, but that’s probably irrelevant)

Answers:

When you have an error like this. Just move to your BOTTOM RIGHT corner of the screen there is something known as GRADLE CONSOLE open that and read what went wrong. That helped me.

Answers:

Try to upgrade your android studio, and when you run your project again, it will tell you where the problem is.

For me, I encountered this problem several times, the first time is something wrong with the style.xml, and the second time is string.xml file. Anyway, It seems Android studio could not find something wrong with .xml file.

But anyway, try to “refresh” your Android studio and let it tell you where are the problems, even reinstall it.

good luck!

Answers:

Android Emulator For Xamarin On Execution Failed After Closing Windows

I had the same problem, and the problem was gone after upgrading my Android Studio from 1.2.1 to 1.5.1. There was no error even after adding --stacktrace --info to VM options. Gradle tasks would finish successfully, but the application just wouldn’t launch (and studio would gray out the run button forever, probably waiting for a response from emulator). I had tried everything else mentioned here.

Answers:

On newer version of AS 2.0
File->Setting->Build, Deployment &Execution-Compilers->Android Compilers->Gradle->Gradle Vm Option

put this as an option -Xmx256m

Answers:

Office 2016 mac business. This can be because you have specified any command line option in android studio settings. You can check this by going to

File > Settings > Build, Execution, Deployment > Compiler

and see “Command-line-options” and check if anything is give. (In your case -x). If so remove it and click Apply and Ok. It worked for me…

Answers:
Android Emulator For Xamarin On Execution Failed After Closing

I accidentally deleted string from string.xml and I didn’t know it was specified in manifest for activity name, so spent one hour to discovered that out

Android Emulator For Xamarin On Execution Failed After Closing Date

Answers:

I had a “Run” problem in Android Studio due to multiple instances of Android Studio were opened. So I closed all instances and opened only on instances for which I wanted to generate APK.And It worked well. May be it had a problem with RAM.

Android Emulator For Xamarin On Execution Failed After Closing Account

Tags: android