I have encountered these errors in android studio? - android

I've recently started working with android studio and encountered these errors:
Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-6.7.1-bin.zip'
Missing essential plugin: org.jetbrains.android
I have tried different things to resolve these errors, like reinstalling Android studio from scratch. Any way to tackle these errors?

Delete the following file and retry
C:\Users\YOUR_USER\AppData\Roaming\Google\AndroidStudio4.2\disabled_plugins.txt
For MacOS users, the file is located in
~/Library/Application Support/Google/AndroidStudio4.2

Installing Android Studio is a messy thing in windows. Multiple modules are installed in multiple folders in cdrive.
So, removing android studio completely is a messy thing.
For the 1st error, you can download the respective gradle zip file and save it in .gradle folder inside C:/Users/username/. But this will not work with newer android versions.
For the 2nd error, you should delete a file named 'disabled_plugins.txt' which will be found inside C:/Users/username/AppData/Roaming/Google/AndroidStudioxyz.v
The same file is also found in Local/Google/AndroidStudioxyz.v also.
So, deleting these files will solve this error.
But, a better way to resolve both the errors is to remove and reinstall Android studio from scratch.
To remove android studio, make sure to remove any folder having the name Android in the following folders:
C:/Users/username/. Here delete .android & .gradle folders. Do not delete AndroidStudioProjects folder, because your projects will be deleted.
C:/Users/username/AppData/Roaming/Google/.
C:/Users/username/AppData/Local/Google/
C:/Program Files/Android
C:/Microsoft/ not must to delete.
Now install your android studio again.
Thank you!

Related

Unable to start Android Studio after installing csv plugins despite deleting plugin folder [duplicate]

This is the first time I've encountered this issue with Studio 4.0. Project and app-level files not able to open, below some other file which not able to open:
Android Studio 4.0 - .csv file Not open, displays nothing.
- .java file not open.
- .kt file not open.
Has anyone else seen this behavior before? And solutions? Advice would be appreciated.
I have used this plugin for CSV file read https://plugins.jetbrains.com/plugin/10037-csv-plugin without this plugin Studio working fine.
Go to the folder:
C:\Users\<username>\AndroidStudio4.0\config\plugins
On Linux:
~/.AndroidStudio4.0/config/plugins/
…and delete the csv plugin folder.
This will solve all of the problems. For any other issue, just go to the File menu and sync the project with gradle files.
I had the same issue on MacOS with AndroidStudio2021.1,then I deleted the following folder:
~/Library/Application Support/Google/AndroidStudio2021.1/plugins/CSV
But still not working for me, then I deleted whole folder of AndroidStudio2021.1 directory path is:
~/Library/Application Support/Google/AndroidStudio2021.1
or You can only delete folder of plugin, It might be work also.
~/Library/Application Support/Google/AndroidStudio2021.1/plugins
For people using Ubuntu 20.04 and having Android Studio 4.1 installed manually (no snap), you'll find the folder under ~/.local/share/Google/AndroidStudio4.1
I had the same problem on MacOS with Android Studio 4.1. I deleted the following folder and it works now:
~/Library/Application Support/Google/AndroidStudio4.1/plugins/CSV
I also faced the similar issue, I have used one CSV file into my Android Studio project and downloaded the CSV plugin after that while building gradle it was showing Lint Infrastructure Error.
Then, I have uninstalled the CSV plugin then everything is fine. (Hope this answer would be helpful to the guys who are facing similar type of error)

Unknown attribute for known attributes in xml files

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?

Gradle sync failed: The file or directory is corrupted and unreadable in android studio

Please Help, Android studio is not working and this error is comes.
I also reinstall the android studio but same error is comes.
I got the solution of the my problem.
Uninstall Android studio totally from the system.
Restart the system.
Go to C:\Users\
Delete .android, .AndroidStudio2.3, .gradle folders. If folder not deleted then change the name of this folder.
Now, Reinstall the android studio.
And then you problem will solved. This is work for me.
I got the solution there no need to Uninstall Android studio simply We need to do only one thing :
go to "file" and click on "Invalid caches\ Restart" option.
Don't uninstall your Android studio.
Rather try Like #Anjali has suggested.
go to "file" and click on "Invalid caches\ Restart" option.
If it doesn't work, close your Android studio and
Delete .android, .AndroidStudio2.3, .gradle folders. If any folder is not deleted then change the name of that folder.
And simply restart your Android studio. It has worked for me.
There is no need to uninstall Android Studio and maybe an issue occurs during the Gradle build time and Gradle cannot load data in the metadata folder or you have multiple data folder in the Gradle file.
Follow the below steps
Go to "C:\Users\PC\.gradle\caches\modules-2"
Close the Android Studio
Delete any metadata folder available from that listing or you can delete or rename the metadata folder as per your project given the error.
Start the android studio and ensuring that you have internet connections
Wait for Gradle to download some files and sync then
Everything should work well after doing that
I have followed the above steps and got success.
In my case this issue solved by just restarting my machine. My project was on 'D:' drive and this drive was getting corrupted and showing a message like 'unable to read files system'.
You can delete this file manually from Linux if you have it installed alongside windows
In my case this issue solved by just:
1- Open This PC, right-click the partition you want to scan, and choose Properties from the menu.
2- Navigate to Tools tab and click the Check button.
3- Check Automatically fix system errors and click Start.

How to resolve Android Studio cannot find JAR 'core-3.1.1.jar' required by module 'gradle-jetty?

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.

Android Studio build error or misconfigured

I am having trouble building with Android Studio on one of my computers. The same project was building fine and when I pushed to github and pulled from the other machine I get the following error
Argument 0 for #NotNull parameter of com/intellij/execution/configurations/GeneralCommandLine.setExePath must not be null
I tried generating a new default project and I get the same build error so it must be something with my setup.
Does anyone know what I can do to fix these issues? Or even how to completely uninstall Android Studio and start fresh? Thanks
I had same error. In my case it was caused because of modification some important configuration. I fixed the issue by executing following steps:
File -> Other Settings -> Default Project Structure
SDKs
Add new SDK (select JDK option)
Specify path to JDK (in my case it was "C:\Program Files\Java\jdk1.7.0_45")
Save changes
You can also check if you have configured path tho the Android SDK
Good luck!
Had the same problem. Had to uninstall Android Studio, delete all files related to it including install files, the .AndroidStudioPreview folder under your user directory, and those files made in your project's folder upon importing. This amounts to the idea folder and the [projectname].iml file. Now reinstall and re-import the project. You can reuse the same build.gradle. Mine's working now.

Categories

Resources