Will Android Studio work on Mac with an ARM processor? - macos

Will Android Studio work on Apple with arm chips ARM (the new Mac devices)?

Good news !
Edit on May 2021 🎉 🌈
Apple Silicon Support
There is an arm64 version available for Android Studio Arctic Fox (2020.3.1) Canary 15 ... Beta03 You can download it here https://developer.android.com/studio/archive
NDK builds doesn't work
First post
Android Studio 4.1 works, but I'm not able to make Emulator work.
Even the ARM image shows me a CPU does not support VT-x
I can confirm, this preview of Emulator works properly https://androidstudio.googleblog.com/2020/12/android-emulator-apple-silicon-preview.html
Since v3 even audio-out works (no audio-in)
Update March 2021
You can simple use one of these and it's working out of the box

For most programming, the chip "underneath the hood" doesn't matter. It only matters if you're working very low-level.
To support old and new apps, Apple will use Rosetta 2, integrated emulation software, to enable ARM-based Macs to run Intel code
The IntelliJ issue for ARM support
The pull request for ARM support on IntelliJ

Intellij (and Google to a lesser extent) has a financial interest in making sure that it does work. Emulation might be slow, but I would be shocked if the IDEs and other tools aren't recompiled to work pretty soon after the release.
Edit: Their IDEs already work on ARM-based Chromebooks, which hopefully means there's little work in making it work for ARM Macs
And on the bright side, emulators will probably be faster?

Android Studio supports it starting at Arctic Fox 2020.3.1 Canary 15. The related ticket.

Android Studio is Basically InteliJ with the Android plugin enabled by default, so if you're impatient, you can use the M1 build of IntelliJ and enable the Android plugin here.
Currently, this has an issue with the bundled sqlite-jdbc not being compatible with Apple Silicon. To resolve this:
Download sqlite-jdbc 3.34.0 or later at https://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/
Go to finder > applications > right click on "Intellij Idea" > "show package contents". Go to Contents>lib and replace the old sqlite-jdbc.jar with the latest downloaded sqlite-jdbc.jar file.
Go to https://github.com/google/android-emulator-m1-preview to get an M1 compatible emulator.

I am using Apple Silicon(M1) Macbook and running Android studio on it. There are 2 things -
Does Android studio work on M1 - YES, it is using Rosette2 to convert android studio binary for ARM. And performance is pretty impressive.
Do i have emulator for M1 - YES, download "Android Emulator M1 Preview2" of emulator from here - https://github.com/741g/android-emulator-m1-preview/releases/tag/0.2
Steps:
Double click the .dmg. It will open folder
Drag and move emulator file to Applications
Right click on emulator file and click open. It will show developer security message. Bypass that from "Security & Privacy" window on Mac.
Right click and Open. And it will launch the emulator.
There are few issues with emulator that will resolve in future releases. You can read more on google page - https://androidstudio.googleblog.com/2020/12/android-emulator-apple-silicon-preview.html
In android studio, you will see this emulator as "Virtual device" in running device drop. Select and run your app.

Related

Visual Studio Preview 2022 will not let my change deployment target

I just installed Visual Studio Preview for the MacOS yesterday. The simulators work fine, but I can't run on any devices I have (both IOS and Android). It keeps saying that the OS version is lower than the deployment target.
Image of the problem
It doesn't make sense; one of the devices I tried was a Galaxy A11 I just got, software version 10. The IOS device has software version 15.4.1. I can't even find what the current deployment target even is. I've checked the info.plist and AndroidManifest files with no success. Yeah I can use the simulators to work on the app but sooner or later I will need to test on a physical device. Can someone point me in the right direction?
If it helps I'm currently running macOS Monterey version 12.3.1.
EDIT: Forgot to mention that I've tried to add the Minimum System Version to the info.plist, but that didn't seem to change anything either.
I was able to determine that the device destinations in the drop-down shown in the question are driven off of whatever XCode command line tools you have set for use before starting VS for Mac.
Presumably if you check your physical device's OS version against the SDK version shown when you type this at the command line will show that the physical device's OS version is lower than the appropriate SDK version shown.
xcodebuild -showsdks

Android Studio for blind developer

I am a blind Java developer. I am following a training in full stack JavaScript and we are learning React Native after React for the web.
I would like to test code with Android Studio emulator, instead of installing on a device.
At the moment I am not able to test my code, and it is very disturbing to learn.
Is there a solution for me to use my screen reader (NVDA on Windows and orca on Linux) with Android Studio emulator window? Because actually my screen readers recognize emulator window as a picture, it is not able to focus widgets.
I would like to use emulator and use the integrated Android screen reader talk back in Android Studio to test my code.
I have followed instructions on this page:
https://developer.android.com/studio/intro/accessibility
I use Expo to launch my project on terminal.
I launch Android studio and start an Android emulator.
I used a NVDA which is 32 bits software.
So I had set up a Java 8 32 bits, because it's the only 32 bit version that I found.
I enabled the Java access bridge with command line in JRE 8 directory, but I have also an Open JDK 11 64 bits installed, it could be a problem.
The main problem that I can not get focus on Android emulator windows.
As far as I know, you can't.
If I remember correctly the Android emulator is not a fully fledged VM, like VirtualBox or Qemu, so you can't use it like a device with the full Android operating system.
In simple words, the Android emulator catches all system API calls and makes your application think it is running into a real Android device. So because TalkBack or accessibility services are separated apps and the emulator can't run your application alongside the accessibility services.
I'm so sorry, but probably the simplest way is to grab an Android phone, a used one from E-Bay for example, to connect directly to Android studio and test your apps.
When choosing a test device take into account the fact that most of the time smartphone vendors apply customizations on the Android version that ships with their devices, so make sure that TalkBack is proved to work reasonably well.
About Java, NVDA and AccessBridge: if you are using the latest version, both NVDA and Android Studio, you don't have to worry about AccessBridge and 32bit stuff. I'm pretty sure that with recent NVDA versions the program runs in 64bit mode and Android Studio ships with his 64bits VM with AccessBridge already there, I'm working with this configuration. In case you may try to activate it with jabswitch --enable command.
On Linux the things are rather difficult, you have to use a distributions with all accessibility software up to date, including Java ATK wrapper, but take into account that Android Studio is not officially supported with Linux accessibility framework at the moment so you have to work with Eclipse or with a simple editor like VS Code.
Please use your Android Phone for such features, because Android studio is not a full fledge Emulator. But using your phone continuously with your Laptop/PC can be a big hassle, so using following method (by getting someone's help) get your phone connected to Android studio Wirelessly.
adb tcpip 5555
adb shell ip addr show wlan0
adb connect ip-address-of-device:5555
IP Address can be found in Settings → About → Status.
This is how you can use all android features for blind people.

Running on Android Studio on my Mac is becoming impossible

I have a 2019 MacBook Pro 13" with a 10th gen i5 and 8 gb of ram. Whenever I try to run android studio on my Mac. My life becomes a nightmare. If I even try to change some of the preferences, it just stops responding, and the weird part is that everything else keeps running perfectly, there are absolutely no issues with any other app running while android studio is frozen I am learning how to code and use such programs and I have no idea why this is happening when I've seen people use 6-7 year old MacBook Airs to run it and it works. I have no plugins installed, just the basic out-of-the-box settings. Can someone please help me.
Android Studio freezes on macOS Big Sur
On machines running macOS Big Sur, Android Studio 4.1 might freeze when you open a dialog.
To work around this issue, do one of the following:
Go to the Apple Menu, select System Preferences > General. In the
Prefer tabs when opening documents option, select "never". Then
restart Android Studio.
Upgrade to Android Studio 4.2, currently available in the Beta channel.
As mentioned by Android Studio Itself

Xamarin Native iOS breakpoints not getting hit VS2017

I cannot hit a breakpoint in VS when debugging any native iOS app through VS2017 Pro. I have trawled the Xamarin/Stack forums and seen this has been a problem in the past and I have tried the suggestions but they relate to a 3.xxx version of Xamarin. Even an out-the-box new project untouched except for placing a breakpoint still does not hit, the build server pops up the simulator and runs as expected. Android is fine
This was working, I have recently downgraded from Enterprise to Pro but think this may be a red herring. I have 2015/13 pro installed with the same problem.
Is this an issue build server side or the windows side? I get the following generated in my bin App.app, App.exe, App.pdb but no app.mdb i do get the referenced dll.mdb files.
Current vs setup...
Microsoft Visual Studio Professional 2017 (2)
Version 15.1 (26403.7) Release
VisualStudio.15.Release/15.1.0+26403.7
Microsoft .NET Framework
Version 4.6.01586
Installed Version: Professional
...
Visual Studio Tools for Universal Windows Apps 15.0.26403.07
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
Xamarin 4.4.0.34 (3f99c5a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 7.2.0.7 (b16fb82)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 10.8.0.174 (7656cc6)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
The Mac
Xamarin Studio 6.3
VS for Mac 7
See this similar answer: Xamarin iOS debugger not hitting breakpoints
Also, make sure you don't have a firewall blocking Port 10000.
I ran into something similar, and it turns out my debug settings for my physical device had some defaults that prevented debugging from working. This may not fix your issue, but you might want to at least check your project settings for a few things.
Under iOS Build I changed my Linker Behavior from Link All to Link Framework SDKs Only. Also, for some reason in a default debug profile, the Strip native debugging symbols option on that same page was checked. Make sure it's unchecked.
This one was already enabled for me but you should verify anyway: double check that on the page iOS Debug that Enable Debugging is checked.
I faced a similar issue but on Android application: I solved by uncheck the option "Code Optimization" from Project >> Options >> Build and set the DebugType to Full
Same here, windows 10, VS 2017 -> MAC -> iPhone
Somtimes I got Debug-Log and can hit breakpoints but mostly not.
A solution / workaround which at least works for me.
Problem:
Setup: Windows 10 with VS2017, Mac-Book, iPhone connected to Mac-Book.
Debug-Log / Breakpoint-Hitting seams to work sometimes (seldom) / non deterministic.
Solution / workaround:
Verify: In case no Debug-Log occurs (e.g. no "Loaded assembly:..." lines etc.) the "Choose Device" drop-down box in the "Tools >> iOS >> Device Log" window shows TWO times the name of the iOS-device.
Stop the debug and explicitly stop the app on the iOS-device (if necessary also delete it for re-deploy)
Via "Tools >> iOS >> Xamarin Agent" disconnect from your Mac and then reconnect again.
Verify: the "Choose Device" drop-down in the "Tools >> iOS >> Device Log" window now shows only ONE times the name of the iOS-device.
Debug the App - it now should work.
See also XamarinForum
Hope it also works for you.
Erdega

Basic Android App not working on Xamarin Android Player via VS2015

I have been trying to run basic Android App provided by Visual Studio 2015 via XAMARIN Android Player. Program gets build and deployed successfully, yet, App or anything does not appear on screen. Xamarin Player takes more than 20 mins to start and then nothing happens. Find Screenshots as well.
WIthin the Android SDK Manager look under Extras there is an package called Intel x86 Emulator Accelerator (HAXM Installer). Installing HAXM will increase the speed of the emulator when you use the Intel Atom CPU/ABI
Also when creating the emulator device check Use Host GPU for increaded performance.
I ran into few issues with Xamarin Android Player as well. Currently I am using Genymotion Emulator and it is much faster.
Well, Well, Well, I got my thing up and running. Following are the steps I performed:
After installing Xamarin for VS2015, I checked for latest Android SDK via SDK Manager. Got all the necessary updates installed.
Installed Xamarin Android Player and used emulator Nexus 5 KitKat API level 19.
Earlier I was using Nexus 5 Lollipop, was the reason why, it was not working. May be its not fixed for buil yet.
As, described by Mr.Pilatus in above answer, the particular HAXM things surely does help in accelerating emulator.
Got my Android app running.
Thank you all for all the necessary suggestion and guiding my in my baby steps in XAMARIN development. Gracias. NAMASTE!

Resources