Android Studio 0.5.8 freezes when new project is imported.
This issue is observed only for "import project" and opening existing projects works fine.
Also for freezing projects the build executes successfully on the command line via the gradle wrapper
I am using Android studio 0.5.8 in a multiproject setup with gradle plugin 0.10
Just before the project freeze Android Support Repository related warning can be observed in Gradle sync window. Not sure if this is related to the freeze issue though.
I have the Android support repository correctly setup via the SDK manager and the project structure in Android studio points to the correct android sdk path.
I've logged a bug for this issue as well. Open Bug Logged
If someone has faced a similar issue, kindly advise (orz)
Related
I am trying to move some business logic from my iOS apps to KMM. I have already made some job when suddenly started having problems with studio. It was not building, there were weird metaspace errors, etc. I was beating around my project for several hours and days to be honest - no result. I decided to completely uninstall studio and all its dependent files.
After that I'm not even able to properly build an empty KMM project. Simple Android projects work just fine. Problems occur only with KMM. When I have created a project for the first time, it has loaded successfully, downloaded all the dependencies and synced. I was able to see "Android" project structure. I tried to build it via ./gradlew build - error. There was no complete description, only the name of the failed task - compile kotlin to ios arm64. An error in a completely new project. I tried rebuilding project - no luck. So I restarted studio and here the second part of magic begins.
From this moment whenever I open a new or existing KMM project, it starts syncing and stucks. I can't open project structure for example, because sync is in progress, I can't add dependencies, because sync is in progress. But I can build it via ./gradlew build and it builds! Well, I tried some more commands, like ./gradlew -refresh-dependencies etc. It was building successfully. And then at some point all the code became red. Below you can see all the colors of Android Studio at the same time:
In the terminal you can see that it was built successfully. In the lower right corner you can see that it doesn't allow to go to the project structure because of sync in progress. And the most beautiful are all that unresolved symbols.
I believe I have tried the most of these Android Studio things:
Invalidate cache & restart
Just restart
Rebuild project
./gradlew clean build
Deleting ~/.gradle and ./gradle and rebuild
Restarting the laptop
Updating all plugins
etc.
Guys, do you have any ideas how can I make studio just work with KMM? And then how should I make it keep working? As I've already said, the problem is not studio specific, it is KMM specific, because regular android projects build just fine.
Android Studio 4.1.2
Mac OS Big Sur 11.2
Kotlin 1.4.30-release-Studio4.1-1
I guess you have encounterd this issue.
Actually I didn't figure how to fix it out, but you can try AS 4.2-beta as this issue seems not be present in this AS build.
The same happend to me and I switch to AS 4.2 beta.
The only difference between you and me is Kotlin version: I have 1.4.21
UPDATE
It turned out that I had a misconfiguration between KMM plugin e Kolin version.
AS 4.1 should work correctly only with KMM plugin 0.2.0 and Kotlin 1.4.20, I had Kotlin 1.4.30 instead. Switching back to Kotlin 1.4.20 fixed this.
I am trying to move some business logic from my iOS apps to KMM. I have already made some job when suddenly started having problems with studio. It was not building, there were weird metaspace errors, etc. I was beating around my project for several hours and days to be honest - no result. I decided to completely uninstall studio and all its dependent files.
After that I'm not even able to properly build an empty KMM project. Simple Android projects work just fine. Problems occur only with KMM. When I have created a project for the first time, it has loaded successfully, downloaded all the dependencies and synced. I was able to see "Android" project structure. I tried to build it via ./gradlew build - error. There was no complete description, only the name of the failed task - compile kotlin to ios arm64. An error in a completely new project. I tried rebuilding project - no luck. So I restarted studio and here the second part of magic begins.
From this moment whenever I open a new or existing KMM project, it starts syncing and stucks. I can't open project structure for example, because sync is in progress, I can't add dependencies, because sync is in progress. But I can build it via ./gradlew build and it builds! Well, I tried some more commands, like ./gradlew -refresh-dependencies etc. It was building successfully. And then at some point all the code became red. Below you can see all the colors of Android Studio at the same time:
In the terminal you can see that it was built successfully. In the lower right corner you can see that it doesn't allow to go to the project structure because of sync in progress. And the most beautiful are all that unresolved symbols.
I believe I have tried the most of these Android Studio things:
Invalidate cache & restart
Just restart
Rebuild project
./gradlew clean build
Deleting ~/.gradle and ./gradle and rebuild
Restarting the laptop
Updating all plugins
etc.
Guys, do you have any ideas how can I make studio just work with KMM? And then how should I make it keep working? As I've already said, the problem is not studio specific, it is KMM specific, because regular android projects build just fine.
Android Studio 4.1.2
Mac OS Big Sur 11.2
Kotlin 1.4.30-release-Studio4.1-1
I guess you have encounterd this issue.
Actually I didn't figure how to fix it out, but you can try AS 4.2-beta as this issue seems not be present in this AS build.
The same happend to me and I switch to AS 4.2 beta.
The only difference between you and me is Kotlin version: I have 1.4.21
UPDATE
It turned out that I had a misconfiguration between KMM plugin e Kolin version.
AS 4.1 should work correctly only with KMM plugin 0.2.0 and Kotlin 1.4.20, I had Kotlin 1.4.30 instead. Switching back to Kotlin 1.4.20 fixed this.
Situation and Problem
I have been working with Android Projects using android studio for a while in Java. Recently, I have started learning Flutter and therefore added Flutter modules into Android Studio.
I opened both Android Project and Flutter Project at the same time in different windows and both project can share the same emulator, and everything seemed to work fine. Yet, the next day I opened the Android Project again, the WHOLE IDE was configured with Flutter settings. This means that:
1. Android Project is NOT synced with gradle, and thus all the imports failed marked red
2. All gradle related files are not visible in the project folder in Android Studio (still exists in folder)
3. All gradle operations are gone because the IDE is configured for Flutter. So there is no rebuild project/clean project/ sync with gradle files button
Things I have tried
Reopen the project
Invalidate cache and restart
Restart PC
But none of them seemed to work. If I tried to create a new Android Project, the new Android Project seems to work fine with all gradle operations available.
Android Studio Versions
Android Studio 3.4
JRE: 1.8.0_152-release-1343-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
I tried to look for similar issues but none seems to match this one. Any one can help?
I had a similar issue. Yesterday, I updated Android Studio to 3.6.1 and that fixed it. Try that.
I found the workaround solution is to import the project again instead of opening the project.
When importing, remember to choose opening it as an Android Gradle Project.
Quite new to Android Dev, and I've been getting a strange error recently. I've searched online, and nothing seems to do the trick, so while I understand that this might be a duplicate question, no other previously asked question was able to offer me a working solution.
When I make a new project in Android Studio (version 2.2 Preview 1), I get bombarded with the error:
Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "84c9986024dd3d7a4767dc5c38710ff1b96f1a21"
With two options: "Fix plugin version and sync project" which seems to do nothing. Upon clicking. And "Open File" which just opens the "build.gradle" file.
In my settings, I have Android Studio set to use the default gradle wrapper. I even set the distributionurl to the newest gradle version, but apparently even that is "too old"...
I have no idea what's causing this problem.
Another peculiar thing I've noticed is that in the project panel, it seems that my project doesnt look as it should.
The project in question looks like this:
Whereas, I understand that it should look more like this:
Again, no idea what's going on... I'm pretty new to Android Studio, but I'll do my best to answer any questions you may have.
While I believe the message may be because you have a 2.2 Preview build of Android Studio, it may want you to use a beta build of the Android Gradle Plugin.
Note: This is not related to the version of Gradle. The latest supported version of Gradle is 2.14.1, which you can check the Android Studio Release Notes, and also here.
From that first link, what I find most people don't understand.
The plugin runs independent of Android Studio so the plugin and the Gradle build system can be updated independently of Android Studio
Or Configuring your build, which explains why they are separated.
you can build your Android apps from within Android Studio, the command line on your machine, or on machines where Android Studio is not installed (such as continuous integration servers). If you are not using Android Studio, you can learn how to build and run your app from the command line. The output of the build is the same whether you are building a project from the command line, on a remote machine, or using Android Studio.
I recently updated from Android Studio 2.0 to 2.1.2 and now I have a project which doesn't open. Android Studio is stuck at the following screen for more than 10-15min.
I tried solutions from these answers.[ans1] [ans2]
but none of them work.
I can create new projects and also import projects built on eclipse. But cannot open my own project.
Please help.
Delete the gradle folder in the project folder. It will work.
For many problems such as stuck with opening or downloading something while starting
I use this sequence as an ultimate guide and on one of the steps always works out.
Recently I used it after updating to 3.2
Try File -> Invalidate caches / Restart
Shutdown Android Studio
Remove .gradle folder in the user home directory
Start Android Studio (Studio will download gradle data)
After Gradle build is done, rebuild project
According to Android Studio's Known Issues https://developer.android.com/studio/known-issues under "Configuration on demand with Gradle 4.6 and above:", if you are using Android Gradle Plugin 3.0.x or 3.1.x with Gradle 4.6 and above you should add the following line to gradle.properties:
org.gradle.configureondemand = false
This seemed to solve my issue with Android Studio getting stuck at "Project setup: reading from cache".