Android Studio update broke Gradle - android

I just updated my Android Studio 135.14 etc to 135.15.
First, I get an SDK not found error, since now the SDK cannot be in the Android Studio folder any more due to checksum problems. I fixed this as instructed, but now when I try to run my app I get the following message.
Failed to complete Gradle execution.
Cause: tried to access method
com.google.common.base.Stopwatch.()V from class
com.android.tools.idea.gradle.invoker.GradleTasksExecutor$3
I've already tried a clean and to delete .gradle from home. I don't see anything in build.gradle that has anything remotely to do with this and I am unsure on how to proceed.
I am not familiar with gradle at all since it just worked for months until the update.

Related

Android Studio shows continuous error with plugins and androidAnnotations.jar

I don't know why, but Android Studio 3.2.1 display a plugin error continuosly. The error is always related to androidAnnotations.jar, like this:
Android Studio/plugins/android/lib/androidAnnotations.jar!/android/content/annotations.xml: Content is not allowed in prolog.
I've updated to latest version of IDE and SDK but the error hasn't been solved. I tried to invalidate caches, reload the project from repository and resync gradle, disable and enable plugins, etc., but without success.
Any suggestion?
After some test and searchs on internet I've found how to solve this issue. Deleting some cache folders from .android, AS recreates it and problems are gone. I followed the steps from the answer posted by #Levi Rizki Saputra.

Android studio showing continuous same error

[It is an image which is showing errors that I want to solve
I am using android 2.3.3 I have changed many setups but some constant problems are apearing
Gradle project sync failed.
Rendor errors
install repository and sync project.
I do a lot search and found some ways I replace gradle folder with new version of gradle but failed to solve this.As i installed repository but error is still there.
Why all setups of android are showing same problem?
Remove all previous installation.
Install java JDK 8.
Install jre.
Download latest Android studio (https://developer.android.com/studio/archive.html)
Follow these steps. (https://developer.android.com/studio/install.html)
Can you specify your system configurations?

Gradle sync failed: com.android.builder.model.AndroidProject.getProjectType()I

My Gradle sync fails with the following error message in the log:
Gradle sync failed: java.lang.NoSuchMethodError: com.android.builder.model.AndroidProject.getProjectType()I
or sometimes I get this error instead:
Gradle sync failed: com.android.builder.model.AndroidProject.getProjectType()I
And this error pop up (The yellowish box that pops up at top of the gradle file in android studio):
Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly.
I had the same issue a few days earlier, but I just clicked file/Invalid Caches/restart and the Gradle sync succeded.However, the gradle fail has returned again today.
I have tried everything suggested here in this post and other SO posts but nothing seem to work, the error is still there.
Is there any suggestions on other things I can try to fix this error?
Delete after backup folder C:\Program Files\Android\Android Studio
and unzip Beta Android Studio zip file into that folder. Hope it help!
I have managed to get rid of this problem now. It seems it had something to do with the latest Android Studio.
I downloaded 2.3 Beta 1 from the Canary Channel, and that's where the problem was.
I went back to using 2.3 Canary 3 from the Canary Channel, and now it works fine.

After gradle update to 2.10, can't run app

I'm running on Android Studio 2.1.1 and was recently asked to update the gradle plugin to 2.10 (form 2.2.1) to have the ability of instant runs, which needles to say I did.
Right after that only one particular project can't build and I've tried everything that's available on the subject as question on stackoverflow.
Here are my settings
project build.gradle:
gradle/gradle-wrapper.properties:
After I try to run I get the following:
via terminal
gradle clean --stacktrace
The last thing is pretty strange since I've set the version to 2.10
Any ideas?
I did my search too on this.Some said to delete the file manually but it gave me a new file everytime i did that.Try reimporting your project and rebuilding it.

Problems with Android Studio - "Please specify Android SDK"

I've just updated to the newest version of Android Studio, and started a fresh, empty project. After finishing the wizard, I opened the main Activity.java file, and there was a message that said:
Gradle project sync failed. Basic functionality will not work properly
I found that I should try the button Sync Project with Gradle Files. This produces another error:
Failed to refresh Gradle project. Could not find any version that matches com.android.support:appcompat-v7:+
Please install the Android Support Repository from the Android SDK Manager
I tried to open the Android SDK manager and got another error:
Please specify Android SDK
So I went into my Project Structure, which has two sections, 'app' and 'Android SDK'. Android SDK points correctly to the Android SDK directory, and app is blank.
What should I do?
I tried downloading the latest SDK bundle and pointing to that in the Project Structure instead, but that hasn't fixed the problem.
I had a similar problem. After updateing to AS 0.4.2 from 0.3.7 I received the error: "Gradle Project sync failed. Basic functionality will not work properly..."
What I did was to delete the content of .gradle folder and modify the gradle-wrapper.properties file:
distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-all.zip
Now it works, I don't know if it's the solution for you, but be sure to backup files before deleting them :)
i know this answer may have been posted before but next time you get such an error after updating sdk,click on file->Invalidate caches/restart. This solution works perfectly for me.

Categories

Resources