I recently installed Android Studio on my Desktop running Ubuntu 17.10. However, when I open any Android Studio Project or even create a new Project, while editing XML files, it wrongly displays an "unknown attribute" error. Normally, I wouldn't care, but this causes Android Studio to not give any suggestions for attributes which I need.
What I've tried:
Invalidating cache
Deleting the .iml file and rebuilding project
Rebuilding and cleaning project several times
Deleting gradle's cache
Updating Android Studio (Current Release is Android Studio 3.1)
Here is a screenshot of what's happening
Try doing a gradle sync. It should resolve the problem
I´ve tryed all the solutions but the only thing that worked for me was 4gus71n's answer.
Deleting the C:\Users.AndroidStudio3.2\system\caches folder solved my problem.
Link to his answer: https://stackoverflow.com/a/53160674/6568421
Use project's SDK not Android's SDK. You can edit SDK Location in local.properties file
I had faced similar issues and all the above also did not worked for me.
If all else failed, do a clean install of android studio. You need to do a clean installation because if you just uninstall and install again, some of the files still remains in your system. It did not work for me when i just uninstall and install android studio. The clean install worked for me and I believe it should solve most of the problems.
I faced this error probably because i installed an entire android project but I am not very sure what is the exact error that caused this problem.
For clean installation, you can look at this links for windows and mac
How to completely uninstall Android Studio from windows(v10)?
How to completely uninstall Android Studio on Mac?
Related
I opened up Android Studio today and for the first time I saw this error:
Error:Cannot find JAR 'core-3.1.1.jar' required by module 'gradle-jetty' using classpath or distribution directory '/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1'
I have tried, restarted both my Mac and Android Studio but yet I still get this error. Can anyone help me?
I had the same problem, follow the answered detailed here to uninstall, and then just re-install. Before importing any existing projects just create a dummy project to ensure that everything finishes installing correctly.
Then simply just tell your antivirus that the project folder for android studio is excluded from the virus searches.
It turns out my antivirus had removed the file.
An uninstall and fresh install of Android Studio was able to solve my problem.
I have the same problem. Yeah, my Antivirus deleted the file too but it's seem uninstall and re-install Android Studio didn't work for me.
After re-install Android Studio, I can work normal with 1 project but when i try to open other project even create a new one, the 'core-3.1.1 jar' error show up again.
Just remove ./gradle folder compeletely.
Let Android Studio install Gradle from new or do it yourself.
I have been facing this problem since i updated to Android Studio 2.1 RC . A quick google search shows that the problem is being faced by developers using Android Studio 2.1. The issue appeared in April and a solution have not been found yet.
I had the same issue. I fixed it with:
1. Build, Clean project.
2. Build, Build APK.
3. Build, Generate Signed APK
I ended up needing to delete the projects cache directory. You can just delete the .gradle directory so that it can be regenerated.
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 can't seem to find the project files in to the newer version of Android Studio. In the screenshot below you can see that it doesn't display the entire project tree.
http://i.stack.imgur.com/ts172.png
The solution offered in this post doesn't fix my problem.
Press alt+1
this work on my android studio 0.3.5 on linux
It happened to me too, in this link it says something about upgrading:
Windows users: Do not install Android Studio 0.2.x in the same location as 0.1.x. Doing so may cause errors such as ClassCastException or other unexpected behaviors. It's best if you remove your previous version of Android Studio 0.1.x.
I fixed it uninstalling my currend Android Studio installation, removing the folder where it was installed with the remaining files, and installing it again. It works correctly now apparently.
I have had the same problem on Android Studio 1.2.2. I have closed and reopen project.
Today, I update ADT to 22.0.1.v201305230001--685705, and found that Eclipse stopped generating R.java. I believed that it is problem of Eclipse, because I create a whole new clean android project, and I cannot even run it as android application. I cannot find any files under gen folder.
The version of Eclipse is 4.2.2, is there any way to solve it?
I try to use Eclipse 4.3 with the latest version ADT, but the problem is still there.
I had the same problem.
Open up the android SDK Manager, and install the new android build tools. Without this you will no longer be able to build anything.
For some reason they have seperated them, and a lot of people are not noticing.
Try deleting bin folder and clean the project..and In Eclipse, under the Project menu, is an option build automatically. That would help you build the R.java file everytime modifications are made. The Clean... option is also there under Project It seems to be a common issue with many different answers
Update android-sdk, I think sdk need Android SDK Build-tools. For update it follow some steps--
Go to Window->Android SDK Manager.
Update and Install all tools (Android SDK Tools, Android SDK Platform-tools,Android SDK Build-tools) which are in Tools folder.
Check the xml files of your layout whether they are properly saved with no error or not.
I have faced similar problem that suddenly R.java is disappeared and eclipse could not regenerate it after building SDK. I checked SDK manager and saw that Android SDK build tool is perfectly installed. Finally, I have noticed that there are some errors in xml files. After fixing and saving those, R.java generated automatically in my case.