Downgrading Android Studio cause unrecoverable error - android

I recently attempted to upgrade my version of Android Studio, Android build tools and the Android Gradle Plugin to 0.6.1, 19.1.0 and 0.11.1, respectively.
That turned out to be a mess. So much has changed, especially with the location of output files, that it made my project completely barf. So now I want to downgrade back to 0.5.9, when everything worked and was fine, but I can't.
I get the message:
Error:Unable to load class 'org.jetbrains.plugins.gradle.model.ExtIdeaCompilerOutput' This is an unexpected error. Please file a bug containing the idea.log file
I've seen a few bugs in the google code forums about this issue, but no mention of any workaround.
I've tried completely wiping my previous install using this post,
And recloning my repo from a place that was known to work with AS 0.5.9 and gradle plugin 0.10.0, but no luck.
So currently I'm dead in the water. Any help would be appreciated.

The same thing just happened to me. Clearing the IDE's cache solved the issue
In Android Studio
File > Invalidate caches / restart...

What finally solved this for me was uninstalling, via the instructions in this post,
How to completely uninstall Android Studio?
and then installing 0.5.9 from scratch.

Related

Android Studio gradle build stuck at app:processDebugResources

I'm on Windows. I created a new project on Android Studio for Marshmallow at least.
The only thing I've done so far is generating the main activity which is a tabbed activity with view pager. Also, you should know that this project is a private git repo that I cloned.
I'm working on this project with another developer and the project is perfectly working on his side.
The problem is:
When I try to launch the app (wether it is a virtual device or my real phone), the gradle build gets stuck at the app:processDebugResources step. I waited more than an hour and nothing happened. Moreover, when I want to cancel the gradle build, it doesn't respond and I have to kill Android Studio process. Then I restart Android Studio and I have to kill a gradle process that prevents the initial gradle build (at Android Studio startup) from working.
The crazy thing is that I was able to launch the app before. I even installed it on my phone!
What I've tried so far:
Do what stackoverflow was giving as solutions like tick the offline mode in the settings
Create a new project --> It doesn't change anything
Reinstall Android Studio --> It doesn't change anything
Deactivating Avast antivirus
Invalidate cache/restart + Clean + rebuild (the rebuild gets stuck like when I try to launch the app)
And maybe other solutions that I forgot...
It's getting very annoying as it's making me lose days of development.
If you have any more solutions, or if you think I should try again some of the previous solutions, help would be greatly appreciated !
I know this is an old post, but I faced the same problem during the last few days and since i got crazy I hope I can help someone else out there.
After many hours of troubleshooting I found that the Java Platform SE binary executable goes in "suspended mode" in Windows 10, preventing Android Studio from compiling (it hangs at app:processDebugResources).
Example Screenshot
Killing the suspended process and recompiling the project works just fine... until Java gets suspended again.
Maybe your gradle version is not compatible with it. Try again with latest version of gradle in your project.
I did several things:
Install NDK
Change JDK from embedded one to Jdk 8
Redownload SDK i was using (6,7,8)
And now the problem is solved ! I have no idea which of these things made the tricks but I'm happy ! It may be useful to someone else one day.

Gradle dependency in android studio

Due to some issue i format my laptop and install the android studio again but now i am not being able to work in it. I cannot create the new project in it. When ever i tried it show this kind of error. The problem of gradle dependency download. I try some solution from the google like downloading the gradle manually and link it through the setting but it didnt work. How can i solve this ??This is the error.. Thanks in advance

Android Studio 2.3 Unknown Error

Has anyone faced this issue after updating to the recently launched Android Studio 2.3? Seems that this error does not affect anything and it only shows on messages. There is no stack trace with regards to it or anything. Building the APK or debugging with these errors do not affect the code in any way.
Project is using Gradle 2.3.0.
Here is my grade-wrapper.properties.
Turns out, screenLayout within each Activity's config is the culprit. I shouldn't have done that. Doing it would result in an error without any stack trace or whatsoever.
If you are using older version of Gradle, then update it by simple steps:
Go to Gradle scripts and then open the gradle-wrapper.properties and replace the distributionUrl with this:
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip
Then start the Gradle sync again with a working internet connection.

Gradle sync failed on first startup in Android studio 2.2.2

It seem I'm struggled of this issue since last week because I couldn't find the same problem that I have on the internet...
My AMD Computer ran on windows xp first and trying to install the android studio 2.2.2 but I've got the problem says Incompatible Operating System so I decided to upgrade to windows 7 but I've got the same thing so I fully upgraded my computer to windows 10 pro 64 bit. Yes the issue has gone but sad to say that I've got a new problem.. Gradle stuck in
Gradle: Resolve dependencies 'app:_debugAndroidTestCompile'
. I've waited half an hour but nothing happen.
I've done checking some possible solution like gradle version and android studio plugin version but noting happen too.
so anybody knows whats going on in this version because in few months ago I am using older version of android studio but I don't get any problem like this...
Update:
Is this a normal duration of gradle synchronizing?
Have you tried deleting your gradle caches? I've found sometimes these get messed-up and deleting them seems to solve the problem.
Gradle cache locates at
On Windows: %USER_HOME%.gradle/caches
On Mac/Unix: $HOME/.gradle/caches/
have you tried updating the gradle version? How many dependencies do you have on your project? Maybe too much dependencies can cause slow actions.
I had a same issue. When I updated to 2.2.2 gradle sync begun to fail an run for 10+ mins. After a long digging through log files and gooogle search I found out it was caused by Comodo firewall blocking JCenter. After uninstalation of that traitor everything runs as before.

Failure to install APK [INSTALL_FAILED_DEXOPT] Android Studio

I have tried literally everything to try and rectify this error when trying to deploy an app to an actual android device for debugging but have been unable to solve the matter. Everytime I try to launch I get a failed [INSTALL_FAILED_DEXOPT] error and when checking the logcat it is always because there is no classes.dex in my debug apk.
If I run gradlew.bat clean assembleDebug, there is no difference in the apk size so I'm assuming there is a build error in android studio. I am using android studio beta 0.86 and have tried it on 0.89 with the same result. I have tried build tools for 19.1 to 21 with no result. I have also tried different devices and created a new project (that has never been installed on my devices) and android studio seems to think it needs to be uninstalled first when attempting to deploy.
I have tried switching my device to ART, uninstalling and reinstalling android studio, redownloading the sdk and restarting my computer. NOTHING and I mean NOTHING has worked. I think the problem started after I downloaded the lollipop apis but am not sure. I have tried uninstalling all apps with my package signature on my device but NOTHING works! Not even Project -> Clean Project -> Rebuild
This is extremely frustrating as I cannot debug my apps anymore :/ has anyone had any experience with this error or ways to rectify it?
So turns out that the issue was mismatching sdks between Android Studio and the Project. The project was using an old sdk and once I made them the same, I cleaned and rebuilt the project and everything was good to go.
UPDATE:
I ran into the problem again after I tried to update my SDK and its tools. Turns out that when you try to do this, the SDK locks the tools folder and then you get an error saying some file couldn't be overridden. When this happened to me, all the build tools were deleted so there were errors in the .dex file created when debuggin my app.
We are using android 2.2 (really old i know) and couldn't find a fix for this error. Eventually we found this bug https://android-review.googlesource.com/#/c/30900/. The only solution for us was to remove some libraries...
I kept having the same problem - manually building worked fine, but Android Studio would not build a proper APK.
The problem was that I started the project on Android Studio and Android Gradle plugin version 2.0-beta2. After updating the Gradle plugin to 2.0-beta6 through a simple build.gradle change, the builds stopped working.
Turns out that, although I installed a beta version of Android Studio, the update checker only checked the stable channel. After setting the updater to check the canary channel as well, I was able to upgrade Android Studio to version 2.0-beta6 and builds continued to work normally.
You can change the update preference in Android Studio settings under Appearance and Behavior -> System Settings -> Updates.
I encountered this error when storage of the device is full. Try to open some space.
Try run these commands
adb reconnect
adb reconnect device

Categories

Resources