Visual studio M1 Mac Xamarin Android Emulator
Hi - have just moved to an M1 mac, can't seem to get the Android emulator running, please can you advise the necessary steps to get this working with Visual Studio and Xamarin?
Xamarin
-
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 68,661 Reputation points • Microsoft Vendor
2022-03-24T06:41:02.99+00:00 Here is a official article about setting android emulator step by step in Mac.
Can you share error when start your emulator in M1 mac?
-
SSB 86 Reputation points
2022-03-24T11:48:23.117+00:00 Hi the official article link is broken, getting a 404.
The link from James is a bit outdated I think.
I've created a arm64-v8a image in VS mac, when i try to run i get this error:
Device error: emulator: ERROR: process is translated under Rosetta. Attempting to replace emulator installation. emulator: Replacing via command: /Users/user/Library/Developer/Xamarin/android-sdk-macosx/emulator/darwin-aarch64-replace.sh (downloading ~120 MB)... sh: /Users/user/Library/Developer/Xamarin/android-sdk-macosx/emulator/darwin-aarch64-replace.sh: No such file or directory emulator: Replacement done. Please relaunch the emulator. You will also need to be using an Apple Silicon-compatible system image. Check the release updates blog (https://androidstudio.googleblog.com/) for more details.
-
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 68,661 Reputation points • Microsoft Vendor
2022-03-25T06:17:09.783+00:00 If you create arm64-v8a image in VS Mac, performance of android emulator is low. If you cannot create a emulator in the VS for mac, you can try to install the Android studio, then create a emulator in the AS, run it, when you debug in the VS for Mac, you can use this emulator as well. And report this issue in VS for mac like this thread:https://learn.microsoft.com/en-us/visualstudio/mac/report-a-problem?view=vsmac-2019
-
SSB 86 Reputation points
2022-03-29T09:55:44.807+00:00 I have created the emulator in Android Studio and when I am now trying to deploy it using Visual Studio Mac to that emulator i get a deployment error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error XA0127: Error deploying 'files/.override/MyApp.Android.dll' using 'xamarin.sync: files/.tools/xamarin.sync[1]: syntax error: unexpected '('
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error XA0127: '.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error XA0127: Please set the 'EmbedAssembliesIntoApk' MSBuild property to 'true' to disable Fast Deployment in the Visual Studio project property pages, or edit the project file in a text editor. -
SSB 86 Reputation points
2022-03-29T10:03:38.467+00:00 Surely there should be some step-by-step instructions by now to get an Android Emulator working on VS Mac for M1? The M1 has been out since 2020....
-
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 68,661 Reputation points • Microsoft Vendor
2022-03-30T06:03:08.957+00:00 Based on this error: error XA0127: Please set the 'EmbedAssembliesIntoApk' MSBuild property to 'true' to disable Fast Deployment in the Visual Studio project property pages, or edit the project file in a text editor.
I find a similar thread about this issue, you can right-click Android project--- choose Android Options--- select the Android build, find the General tag to disable Use Fast Assembly Deployment.
-
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 68,661 Reputation points • Microsoft Vendor
2022-03-30T06:11:22.71+00:00 VS 2022 for Mac is still in Preview. You can use the Help > Report a Problem or Help > Provide a Suggestion menus to report a problem,
And Q&A is for technical questions. If you have feature request about Microsoft Learn, you can open an issue in the xamarin-docs Github page:
Sign in to comment