Reputation: 6424
Being new in Android devopmnet, I have been using Android Studio for development, but suddenly it doesn't work anymore.
The program doesn't launch anymore, and If I execute the studio.bat from Command Prompt, I get the following error:
Error: Could not find or load main class com.intellij.idea.Main
I have seen other posts about Android Studio not launching (e.g. this and this), but neither of them solve my problem. I have set PATH
variables for both JAVA_HOME
and JDK_HOME
correctly to C:\Program Files\Java\jdk1.7.0_07
As I have mentioned, Android Studio used to work and I don't have any idea why it has stopped working. Any clue?
Upvotes: 13
Views: 37198
Reputation: 1
Open the Installer and download it again and you can select delete previous versions to clear confusion.
Upvotes: 0
Reputation: 755
This happens when you update Studio and new version is installed and previous one is in process of deletion: at the main time if PC shut down or suddenly crashed due to power cut etc. Then this problem will appear:
could not find main class com/intellij/idea/main
Solution:
Go to this path "C:\Program Files\Android", there you will find two Android Studio Folders.
Find which one is latest: (Latest name wold be "Android Studio1") && (Old version would be Android Studio)
Delete old one(if you don't need it any more) and launch latest exe on this path:
Upvotes: 0
Reputation: 1
Well after searching allover the web, failed to get solution till i decided to reinstall android studio. same folder changed nothing didn't delete anything just reinstalled and boom works as before
Upvotes: 0
Reputation: 571
I faced the same issue while launching the studio.exe
file. The actual problem was I have downloaded the 64-bit version of Android studio. But my computer supports only 32 bit.
So I downloaded 32-bit version and installed.
Now it is working fine.
Upvotes: 0
Reputation: 3709
I had the same issue after updating the Android studio. I was not able to launch it from click on Android Studio icon and after running ./studio.sh
it was giving me same error
I follow the below step and solved the problem.
I downloaded the studio and install it in the new directory.
After installation success, copy all the files & folders and paste and replace it into old location where studio was installed.
Upvotes: 1
Reputation: 40255
Please follow the below steps,
Upvotes: -1
Reputation: 61
If you have recently uninstalled and reinstalled Android Studio and had previously pinned the Android Studio icon to your Task Bar or Start Menu, it may be that this icon no longer looks for the new installation. Delete it and re-pin it and all will be fine.
Upvotes: 0
Reputation: 21
if you have just used copy paste of exe file it will show this message so go in Program Files\Android\Android Studio\bin and click on exe file.
Upvotes: 2
Reputation: 19
I found Answer: you just make wrong shortcut
(just ctrl+C ctrl+v) for launchfile(exe). You must make shortcut following this method:
Right mouse click and select make shortcut menu.
Upvotes: -1
Reputation: 99
For android studio 1.3.1 go to environment variable and create new variable and give it a name JAVA_HOME and in path use this C:\Progra~1\Java\jdk1.7.0_71. I hope that can help you.
Upvotes: 2
Reputation: 226
Having JAVA_HOME set to point latest JDK version (C:\Program Files\Java\jdk1.7.0_79) will make the Android studio work. Make sure the path is correct. Seems that JDK_HOME is not needed. can refer Installing Android Studio (Not working)
Upvotes: 0