Cannot build an Android Studio project on MacBook Pro M1 - android-studio

I just bought a Mac Pro M1 and downloaded Android Studio. When I try to build my project I get this build error
Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not create task ':app:minifyReleaseWithR8'.
Cannot query the value of this provider because it has no value available.
Does anybody know why is this happening?

Especially if you are trying to build your project on a new machine, make sure you have accepted all software licenses for Android SDK components, which Gradle might be installing automatically if you haven't already installed them (and thus manually accepted the licenses).

It's nothing to do with M1. I've seen that on Intel Mac as well. It's something to do with your project setup.

Related

How to install SDK in android studio?

I once completely deleted Android Studio, but when I want to install it again, during installation, tick of SDK is not checked and it is not installed.
The installation location of SDK cannot be determined, whatever I do
I add ANDOID_HOME in environment variables in windows
I create C:\Android\Sdk SDK but But unfortunately SDK was not installed and
You will probably find the answer to your question here.
(I don't know if this will be your answer.
Because I have never come across such a problem).
I Think SDK is not in your system But you can download SDK from android official site for Android, mac or Linux.
Here is the link : https://developer.android.com/studio/releases/platform-tools
And paste the SDK here : C:\Android\Sdk

Android Studio [BumbleBee 2021.1.1] Emulator Timeout on Mac M1

I have Android Studio BumbleBee 2021.1.1 downloaded, running on a MacBook Pro M1. When downloading Android Studio, I chose the Apple Chip option (opposed to Intel)
I've created a Virtual Device - Android 12.0 arm64-v8a Pixel 4.
When I attempt to run the emulator it gets stuck here
Then, it times out:
I have searched SO and other blogs and can only find outdated material based on a time in 2020/2021 when Android did not support ARM64. However, it's my understanding that this has now changed so https://github.com/google/android-emulator-m1-preview is no longer needed.
What is the correct way to run the Android Emulator on a Mac with an M1 Chip?
I have found the issue so marking this as solved, however, if anyone knows why this solves the problem, please share!
I found an issue opened on Google's anroid-emulator-m1-preview repo with this answer https://github.com/google/android-emulator-m1-preview/issues/76#issuecomment-1023563846
Turns out, I just needed to uncheck 'Launch in a tool window' but again, not sure why that fixed the issue.

Gradle sync error

After installing Android studio for first time, the gradle didn't sync.
The dependency is this: classpath 'com.android.tools.build:gradle:2.3.3'
so after watching some tutorials I downloaded and extracted gradle-3.3-all.zip in the .gradle folder.
Still it won't work and this is the error:
Error:CreateProcess error=216, This version of %1 is not compatible
with the version of Windows you're running. Check your computer's
system information and then contact the software publisher.
I'm using windows 32 bit btw.
This is my first time with android studio so pretty much everything in it is Greek for me. Please help.
not compatible with the version of Windows you're running
The download button on the Android Studio page is the installer for the 64 bit version, as far as I know, which is recommended since almost all newer computers are running 64 bit.
If you really want to continue using 32bit operating system, you're going to need to scroll down the page to actually download and setup that one.

Android Studio for Mac not opening

I am not able to get Android Studio running on Mac, even after waiting for 15 minutes or so, it's still stuck on this screen:
What could be the problem?
Android Studio v2.2.3
MAC OSX 10.12.1 on MacBook Air
Its just downloading necessary elements and SDK if necessary. So please check your internet connection and give it some time to finish the download.
I faced same problem. Found the solution..
Just delete all files related to AndroidStudio first.. you can refer
https://gist.github.com/tahmidsadik112/f08356d14a85d898299a
Now install AndroidStudio again and if you are behind any proxy then after launch setup the proxy with authentication.. That's it!!!
For me it was a bit different experience, when I tried opening Android studio for the first time in my Mac. It allowed me to create a new Project and then while loading the IDE it got stuck -
The IDE was not getting opened. Apparently it seems like it was downloading something of size around 250 MB. I was stuck there for around 30 mins.
Then after 30 mins when the IDE opened, it threw an error and asked to install missing platform and sync project.
I clicked on the link and a new installation started of Android SDK Platform 26.
After the SDK Platform being installed it threw another error and asked to install the SDK build tools. On clicking the link the installation started:-
Finally after the installation of the SDK build tools, I was able to open the Android studio and access the code error free:
Happy Coding!! :)

Is there a way to remotely build Xamarin.iOS with sdk 6.1 in VS2012?

I have an iOS project that was developed for iOS6.1 and I need to be able to build it for both iOS6.1 and iOS7. I updated all tools from Xamarin and upgraded to OSX Mavericks and iOS 7.0.3 on the iPhone. So at this time I have all latest versions.
When I start to debug the project from VS2012, the app that starts on the iPhone is always an iOS7 app. I added the iOS6.1.sdk to Xcode 5 so back on the Windows machine I can select this SDK in VS2012 for compilation.
But it seems that, whatever SDK I choose in the project settings, it always returns:
-debug -linksdkonly-sdk "7.0"-targetver "6.1" --abi=armv7 (arguments taken from the mtbserver.log on the building host)
If I build the project with Xamarin Studio on the Mac the behavior is as expecting when changing the version of the SDK.
Is there a way to get around this when building remotely with VS2012?
That's a bit uncommon and it sounds like a bug - you should file it on bugzilla so it will be confirmed (and fixed if it's the case).
Most people I know install several Xcode side-by-side, i.e. they do not copy an old .sdk directory into a newer Xcode release.
You might want to try this (the trick is to rename Xcode.app before installing the new one) and then set the VS addin to the older (e.g. Xcode46.app) directory when you need to build for iOS 6.1.

Resources