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.
Related
After upgrading Android Studio to 4.0 version and in "gradle-wrapper.properties" :
distributionUrl=https://services.gradle.org/distributions/gradle-6.1.1-all.zip
I am getting the following error in Android Studio while syncing:
No builders are available to build a model of type 'org.jetbrains.plugins.gradle.model.internal.DummyModel'.
and unable to create or run the app build.
This can be one solution. I tried Copy and Cut everything in the setting.gradle file located in the project directory then SYNC project after Gradle is complete. Later paste the content back to the file and SYNC again. This not worked for me but for others, it worked.
Another solution is to downgrade the android studio to v 3.6.3 download by clicking here. You can follow these steps to downgrade the android studio. This solution worked for me and now I can build and run the application successfully.
I solved it by navigating to the Project settings in the settings.gradle file and COPY and CUT everything then SYNC the project after gradle is complete PASTE back the content you had copied and SYNC again.
This worked for me
Still not worked
Please use different gradle version.
ie case gradle-wrapper.properties. Instead of your version
distributionUrl=https://services.gradle.org/distributions/gradle-*.*.*-all.zip
update with
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
Thanks
I tried all the solutions above but I didn't succeed so I uninstall android studio and then installed it again and saw all the problems solved and I have no problem . so I recommend you reinstall the program as a last step .
REINSTALL
I am using Android Studio 3.2.1. This error, where the R class is highlighted in red, says Cannot Resolve R, but the app builds and runs just fine, there are no errors in compilation, it just shows R as unresolved reference in the IDE.
This problem only happens in one project that uses Kotlin, and all the other projects open and work without any problems.
I went through most solutions in stackoverflow and that didn't solve the problem.
I'm using ubuntu and it works on other windows pc. Could there be a problem in ubuntu.
These are the solutions that I have tried
clean project
rebuild project
make project
invalidate cache and restart
sync project with gradle files
updating sdk files
updating dependency
recloning the project
checked all my xml files
Kotlin plugin was updated
snapshot
xml snapshot
The issue still persists. Please let me know if any other details are required.
Thanks.
Just try reinstalling it
Hope it works :)
this problem with the android studio itself try to clear cache and restart from file --> invalidate the cache and restart if still not working reinstall the android studio and open the project from the beginning
After trying a preview version that gave me odd errors, i just did a fresh install of Android Studio 1.1.0 on Ubuntu Linux.
I also removed the preferences directory to start from scratch.
Now even with new projects gradle sync fails with this error and i cannot find the cause or other informations that can give me hints about the cause:
Error:Cause: org.jetbrains.plugins.gradle.tooling.ModelBuilderService: Provider org.jetbrains.plugins.gradle.tooling.builder.ExternalProjectBuilderImpl not found
Does anybody knows how to fix this?
Solved by deleting the $HOME/.gradle folder.
I guess executing the preview version messed up something there.
I had to delete the .AndroidStudioPreview, .gradle/ and the .android. Basically it's like to uninstall android studio, but it worked for me.
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.
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.