After updating the newest Android studio,I cannot load project anymore.And the error message:
Cannot load project:
com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal
error initializing 'com.intellij.debugger.DebuggerManager'
I have tried to download it again,and reboot my system,it is not available. please help me.Thanks!
Recently I faced same issue where I was getting slightly different error related to XDebugger failure. It was because my project was in debug mode when I shutdown my laptop and intellij was not closed properly. It tends to try and find stored compiled classes again from cache when you start next time and when it could not find it from cache it just do not allow you to load full project.
Just Invalidate and restart option worked form.
File-> Invalidate Caches/Restart
It seems like there is something missing.Try to import your project new.
Or you press File->Invalidate Caches/Restart
Or restarting your laptop *works often (but you did as I know)
Or clear your cache and try to restart -> exit Android Studio-> Remove all the files in the cache directory(home_dir/.AndroidStudio/system/cache)->Then restart //but to prevent more erros :d safe them
Had some trouble with this one for a few weeks myself but in the end it turned out that the issue was actually with my Java_Home environment variable. It was pointing to JRE1.8.etc when it needed to be pointing to JDK1.8.0_101.
I probably just clicked on the wrong dl link or something, because when I downloaded jdk1.8 it replaced the jre file. Then just update the environment variable by right clicking My Computer within the file explorer (for windows) then going to properties->advanced system settings->environment variables. Then just edit your JAVA_HOME environment variable with the path of to where you installed the jdk (you can browse to it with file explorer then right click on the file path bar to copy the address and use CTRL+V to paste it). Hope this helps.
Related
my project was working well but suddenly when I ran it on my phone, Android Studio freezes and I should stop it from task manager.
before this happens I installed "Geny motion" & "Virtual Box", but when the error occurred I uninstalled them. but the problem insisted.
Solutions I've tried
I uninstalled it and installed it again
I unplugged and plugged in my device
I disabled android indexing from setting
None of the above solutions worked.
I had today this exact problem. None of the above helped me until I found simple solution here
Just run File -> Invalidate Cache and Restart
That simple and it works!!!
Delete all Android Studio data - .gradle .android .androidstudio folders from your home folder. And all project build folders gradle and iml files.
This worked for me.
1.Close the project
2.Remove the project
3.Close Android Studio
4.Open it again
5.Open the project
Enjoy Coding!
I checked my java file and I saw somehow all the code in one of my java files was replaced with "NULL NULL NULL NULL....."
I deleted the file and the application runs without a problem.
Android Studio (3.1.3) froze on me while editing a source file. I waited and finally killed the process in Task Manager (Windows). Twice I tried to start up again and both times it got stuck with the "indexing..." message in the lower right. Both times I ended the process in Task Manager.
I looked in the source folder of the project I was working on. The source file I had been editing when it froze was "Receipt.java". There was another file in the src folder "Receipt.java__jb_tmp__". I deleted that file and Android Studio started up fine. It looks like I lost some edits, though.
When I did start up, it detected there had been some error and offered to submit a report.
If the project is large & has a lot of modules, you might need to increase the Allocated Heap Size for Android Studio.
Go to Edit Custom VM Options from Help menu and increase the value for -Xms and -Xmx
This is what I'm using
-Xms2048m
-Xmx8192m
-XX:MaxPermSize=2048m
-XX:ReservedCodeCacheSize=1024m
-XX:+UseCompressedOops
In my case color was declared as invalid, Android Studio ignored that and during building it froze. I had to remove the file, let it index, paste it back and fix the color string (it gave me error when I entered the pasted file)
just rename project folder then open IDE, it will show
now rename back to origin folder name, click open project
it work on my case
I have older project with sdk version 22, when I open it in android studio 3.1.2 on macOS. It keep indexing forever, everything was installed and configured properly but indexing loop never stopped.
Following worked for me
File > Invalidate caches/restart… > Invalidate caches/restart
Go to the File menu and click the option Invalidate Caches / Restart This will solve the problem ! Enjoy ;)
My laptop crashed while Android Studio was running.
Now, When I tried to open project in Android Studio it gives me weird error and no project is opening.
Cannot load project: java.lang.RuntimeException: java.io.IOException: java.lang.AssertionError: Unexpected content storage modification"**
Edit: Also I'm in the welcome screen of Android Studio and have no access to Menu options to Invalidate Caches and restart Android Studio.
I had really big issue as I was not able to open project in Android Studio. Every time I start Android Studio dialog box appear that says:
Cannot load project: java.lang.RuntimeException: java.io.IOException: java.lang.AssertionError: Unexpected content storage modification
I solved it by doing following steps:
Close Android Studio
Go to the directory home_dir/.AndroidStudio/system/cache
Remove all the files in the cache directory.
Then restart IntelliJ
No guarantee this will work, but I have previously fixed a problem which is similar to this by invalidating the cache.
In Android Studio this is under File -> Invalidate Caches / Restart
For Android Studio 2.O follow these steps:
Close Android studio
Go to ~/.android/cache
Delete content
Restart android studio
Hope this will help
In C\users\.Androidstudio delete gradle.jar and try
Backup the jar before proceeding.
I got the same issue and this is related to IDE .
Android Studio has to do a fix.
I found the same issue but I found a fix, and all it took was renaming/deleting the .AndroidStudio hidden folder in Windows, under your home directory.
C:\Users\YOURUSERNAME.AndroidStudio
I renamed mine and I'm back up and running.
I could solve this issue in android studio by selecting File-> Invalidate caches/Restart .
Start Android Studio, close any open project.
On the right side, click on Configure -> Settings.
On the left side, in Compiler->Gradle set VM Options to -Xmx512m
Press OK, then create a project. Worked for me.
also because of that
It turns out it's a Windows 8 issue with the available virtual memory. It seems like a few new processes (like Superfetch) eat up a ton of processing power to constantly scan your drive for changes, so searching is faster.
The solution is to change the min and max virtual memory values. Here's how to do that:
http://windows.microsoft.com/en-us/windows/change-virtual-memory-size#1TC=windows-7
I am aware that other people have tried to resolve this issue but have thus far found a suitable answer.
The error is, on start up, eclipse gets hung up on "Android SDK: resolving error markers" furthermore, if I try to interact with it, it freezes completely and I am forced to force quit.
This is the progress dialog:
I find it odd that it needs to resolve the error markers multiple times but I assume this is just for each project in my workspace.
this is my eclipse.ini:
Other things to note being that all that currently exists within my workspace is an Android Application, an App-engine endpoint project for the before application, and 4 needed referenced libraries. All mentioned projects are open. Is this a matter of me overloading the IDE or perhaps there is some loop I threw it into? I find it hard to imagine that this is a unique circumstance.
UPDATE:
When I delete the app engine endpoint project from the workspace and restart eclipse, it loads fine. When I bring it back in, all good. But when I restart from there, it goes into error loop again. I am convinced that I have a circular reference in there somewhere but I cant figure out where. Thanks for your help.
This problem made me crazy until I found below, if I didn't post the answer, I am not a man!
Hope this helps if you are also going crazy
I found from Eclipse Stuck at "Android SDK: Resolving error markers":
cd [my workspace folder]
cd .metadata
find . -name .markers -exec rm {} \;
eclipse -clean -refresh
if you are in win32
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S .markers') DO RMDIR /S /Q "%%G"
I solved the issue with this (from your eclipse folder):
eclipse -clean -refresh
I followed this url: http://tekhoow.blogspot.com.es/2013/06/eclipse-stuck-at-android-sdk-resolving.html (but the eclipse command was enough for me)
There is also another stack question with the same topic and say the same:
"Clean all projects in your workspace and restart Eclipse to solve this problem."
How to Resolving error markers Eclipse Android SDK
After trying all suggested ways, the only way solved my problem was deleting this file:
/workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
Original answer
I was having the same problem, and found the solution by going running "eclipse.exe -clean -refresh" from the cmd prompt. The above solution includes other commands done in the .metadata folder which doesn't apply to all versions of Eclipse. I am using Eclipse IDE for Android Developers 23.0.2.1259578.
There is a very simple way of invoking the above answers on Mac OSX:
cd workspace
rm ./.metadata/.plugins/org.eclipse.core.resources/.projects/*/.markers
(or)
rm ./.metadata/.plugins/org.eclipse.core.resources/.projects/Project-Name/.markers
cd eclipse.app/Contents/MacOS
./eclipse -clean -remove
This has happened to me before.There are errors in the libraries related to the Google App Engine project, what you need to do is close Eclipse, go to your workspace and move every other project not related to the Google App Engine project to another location on your computer, then start Eclipse and make sure you resolve all the issues with the backend project ,then copy the other projects back to your workspace.
figured it out a couple days ago and forgot to inform y'all.
all I needed to do was save the projects to some other directory if you have not already. Delete it from your workspace and also delete the app engine endpoints project.
Re-import the android project and copy into workspace. set the java build path and everything else (if it says 'project master' control click -> team -> disable) everything should look fine. Then, delete all references to the app engine project, this means folders called 'endpoint-libs/libcontainers...'
This will break your project everywhere you reference the data model
Now, re-import the app engine project and make any necessary changes so that it doesn't have build errors (warnings may be OK).
Control click -> generate cloud endpoint client library. The libraries in the original project will be replaced.
Not entirely sure what caused this but for the time being it has been working beautifully.
Great topic!!
After reading all answers. I have found a simple solution and It work fine on windows 7.
I created a file "eclipse_start.bat" with this simple command lines:
cd /d C:\eclipse (the directory where is the eclipse.exe file)
eclipse -clean -refresh
cmd
Every time i have to launch Eclipse simply I launch this file so the program start without problem.
I tried also another solution. I added this line in the file "eclipse.ini" before all other line
-clean
-refresh
In this way I can launch directly Eclispe with the same result but in a more cleaned way.
Thanks to everybody!
I have a simply solution without code. Stop the process "resolving error markers" using the red button, then uncheck Build Automatically (Project -> Build Automatically), close Eclipse and open it again. Check again Build Automatically.
Sometimes it happen again, then I do this same process. Boring, but it works.
Try go to workspace folder, in \workspace.metadata.plugins\org.eclipse.core.resources.projects
You will see folders with your projects. Open every folder and remove files ".markers". After restart Eclipse
To me, nothing helped but then I went to .metadata/.plugins/org.eclipse.core.runtime and deleted files:
com.android.ide.eclipse.adt.prefs
com.android.ide.eclipse.ddms.prefs
Eclipse started normally again.
I used the answer above - first installing cygwin to get the Unix style "find" installed (note that the DOSbox "cmd" version of "find" does not work - in the following line at the top of your Eclipse workspace that hangs:
find . -name .markers -print -exec rm -i {}
Note that the "-i" specifies "interactive" remove - and will confirm each ".markers" file that is to be removed. Then I followed this with a
./eclipse.exe -clean -refresh
in the eclipse folder. I will check again (after the next hang :-) to see if just the second line is all that is necessary. Anyway eclipse is happy again and so am I! Note that installing the full cygwin package takes a while (many hours) - but it is worth it - just start the install at the end of the day and let it run overnight...
go to the eclipse folder with cmd,(Shift+right click on eclipse folder and chose open with command promt)
then type "eclipse -clean -refresh "
You should delete the .marker file from your all project which is exist in .metadata.plugins\org.eclipse.core.resources.projects(your all project).
So on a Mac, with Eclipse ADT, the clean and refresh method did the trick for me. Here are some slight modifications:
Go to ADT Location (if Android) -> Eclipse.app -> MacOS
In this directory you should find eclipse.
Type the following command and you should be good to go:
./eclipse -clean -refresh
Create a text document in the Eclipse installation folder
Paste this command and update with your installation folder name
"C:\Folder where Eclipse is installed\eclipse\eclipse.exe" -clean -refresh
Rename to CleanEclipse.bat and run every time you have this issue
Will save you a lot of time!
I frequently facing this problem. And my final approach was..
First open TaskManager by pressing CTRL+ALT+DEL and delete all instance of adb.exe. if problem doesn't solve then go to next step without closing taskManager.
Close Eclipse and also check it shouldn't be running in TaskManager(also finish its process).Then Open %USERPROFILE%/ on Windows or simply ~ on Linux/OS X (You can locate this folder from the Desktop). then open .android folder and delete cache folder and ddms.cfg and start Eclipse. If still your problem doesn't solve follow.
If your problem doesn't solve by following above method then go to workspace folder and delete as suggested by this Answer
/workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
If problem still doesn't solve then Pray to God.
I've sorted out most problems with migrating an old Android project from Windows to Mac, but a path issue remains.
When I load up Eclipse, it gives me an error message saying:
"Parsing Data for android-7 failed. Source attachment path 'C:\Android\sdk\sources\android-17' for iClasspathEntry must be absolute"
Obviously this path is wrong, but where on earth do I change it?
I was facing the same issue and found and found a useful link to show hidden files on a mac.
Run the following command from the terminal window on mac
defaults write com.apple.Finder AppleShowAllFiles TRUE
After that, relaunch finder (alt+ right click)
Then it will show the hidden file .metadata folder.
Delete the following file:
.metedata/.plugins/org.eclipse.jst.j2ee.web/webLibrariesCache.index
Restarted eclipse; the error should go away.
First close Eclipse.
Then go to
.metadata/.plugins/org.eclipse.core.resources/.root/.indexes
Open the file with a text editor and change the path for the SDK.
Restart Eclipse and everything should be fine!
Every time I open Eclipse, I get the following error messages:
Android SDK Content Loader:
parseSdkContent failed java.lang.NullPointerException
Initializing Java Tooling
An internal error occured during: "Initializing Java Tooling". java.lang.NullPointerException
Loading data for Android 2.2
Parsing Data for android-8 failed java.lang.NullPointerException
Loading data for Android 2.3.3
Parsing Data for android-10 failed java.lang.NullPointerException
Loading data for Google APIs (Google Inc.)
Parsing Data for Google Inc.: Google APIs:8 failed java.lang.NullPointerException
See link for screenshot:
http://i.stack.imgur.com/lhhQQ.png
(I am using OS X Lion, and Eclipse Helios)
First i read some posts saying that it was the AVD.ini file in the .android profile that was causing the trouble. I tried deleting all the entire .android profile folder as suggested in Android SDK Content Loader failing with NullPointerException. This didn't correct my problem.
I tried deleting the entire Android SDK folder, downloaded it again and installed a couple of Android versions through it. Still the same error messages...
To ensure that I didn't have any old plugins or something that were the issue, I uninstalled eclipse, downloaded it again and installed the Android plugin again. (So the plugin is up to date).
When I go into one of my Android projects, I get error messages on places where I acces resources by using the R file. Regular Java projects work fine, but all Android projects gets small red boxes with white crosses on them. I have been searching for a solution to this problem since yesterday, but at this point I'm completely qlueless and would appreciate any help I can get!
Close all open projects and exit Eclipse. Now you can open Eclipse without getting the error. Start opening your projects one by one to find which one causes the problem. This is most likely because you deleted a Device profile inside the AVD manager.
Do not delete all the full .metadata
Backup .metadata
delete only .metadata/.plugins/org.eclipse.core.resources/.project
restart eclipse
Observation : the projects folders are created
Further - if you are using svn/git/hg have code repository links it would be destroyed, so to reinstate
close eclipse
copy relevant projects from backup to merge with current projects in .metadata/.plugins/org.eclipse.core.resources/.project
restart eclipse
Downfall - sporadic fail error may occur (sync or something) - harmless
backagain
I encountered exactly the same issue this morning. This is a workspace related issue.
Solution 1
I looked into my .metadata and read .bak_number.log files . Some layouts failed to parse and my projects were out of sync with the file system.
So I deleted all the .bak_number.log files. Relaunch Eclipse and the whole worskspace should work again the way you left previously.
Solution 2
However if it's not due to out of sync with the file system. Change the workspace then import all the eclipse projects from the previous workspace.
Thanks the project.properties files , the dependencies are still kept.
PS : I should return to IntelliJ :)
first close your Eclipse
Go to your workspace and rename .metadata to tushmetadata and go to
tushmetadata- >.plugins -> org.eclipse.core.runtime -> .settings
and copy all files from it.
now open the Eclipse and go to your workspace there you can see the
newly generated .metadata folder in that go to .plugins ->
org.eclipse.core.runtime -> .settings and paste here and do not
overwrite any file.
Try to "Hello World" project and run it.
Try to delete file .metadata from your android workspace folder. .Metadata folder contains all configuration files for eclipse. It works for me.
Your answers might be right. What I did was to change my workspace. I redownloaded the project I was going to work on from git, and reimported it. Now it works fine :) Maybe there was some files in this project that made the error messages apear? Dunno....
I have remove the .metadata folder but after it, when I run the eclipse, I cannot creates any Android project. To solve it, I have done the follow:
Go to the main work directory of eclipse
Localize the folder com.android.ide.eclipse.adt It should be in .oldMetadata/.plugins/
Copy it to the new eclipse configuration: .metadata/plugins/
See the full solution here:
http://www.jiahaoliuliu.com/2011/06/running-android-sdk-in-eclipse-errors.html#solution4
For me, the source of the NullPointerException problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a project.properties file. It's not an Android project, but for some reason the newer versions of the SDK somehow expects the file there. To fix the problem, I just copied a project.properties file from an Android project to the host unit test project.
When I met this problem about a year ago, I had some projects in my workspace that needed a specific Android SDK level (let's say 2.1) and i didn't have it installed in the Android SDK.
slott's answer helped a lot. Deleting the .metadata or reinstalling eclipse didn't though. The trick was to isolate the project causing the problem, delete its .settings folder and .project file and reimport it.
I discovered another cause, where I'd added a space character into an otherwise blank line in the project.properties file. When I eventually ran android update project -p .
the program (android.exe) threw a NPE exception. When I deleted the space from the blank line the android update project command worked and eclipse started behaving (after running clean a few times).
This happened with r20 of the Android SDK on a Windows 7 64-bit machine.
FYI my change that fixed the problem in project.properties is public at http://code.google.com/p/android-daisy-epub-reader/source/detail?r=517
This is just weired.
In my case when I took a subversion update, I was getting this problem. The reason was the corruption of my project.properties file (due to subversion conflict).
I just corrected the file and problem got solved.
I found it's just missing project.properties file in the project folder. After copying one from another project the error is gone. The only valid line in project.properties is
target=android-8
If you are using SVN or GIT please check whether the project.properties has conflicts or not.
Sometimes project can not be open because of this.
I hope this is useful to someone and saves his/her time: My colleague was facing same issue and we did almost everything mentioned here, with no luck. In the end we changed the Android SDK version in the manifest file and it worked.
This solution worked for me.
Close Eclipse and delete all .markers inside your workspace folder.
Restart Eclipse (once I had to restart it twice, it hang on the first but worked on the second for no aparent reason).
Of course, it's always safe to back them up first.