user2838319
user2838319

Reputation:

Android studio - can't create a new project

I installed Android Studio for the first time. When I try to create a new project from welcome screen, it does nothing. So I open Workspace and click on File -> New project, still nothing. I have latest Java version installed on my computer.

Here is the log file of Android Studio:

2015-02-25 08:54:01,209 [  88653]  ERROR - llij.ide.plugins.PluginManager - Android Studio 1.1.0  Build #AI-135.1740770 
2015-02-25 08:54:01,213 [  88657]  ERROR - llij.ide.plugins.PluginManager - JDK: 1.7.0_75 
2015-02-25 08:54:01,217 [  88661]  ERROR - llij.ide.plugins.PluginManager - VM: Java HotSpot(TM) 64-Bit Server VM 
2015-02-25 08:54:01,221 [  88665]  ERROR - llij.ide.plugins.PluginManager - Vendor: Oracle Corporation 
2015-02-25 08:54:01,225 [  88669]  ERROR - llij.ide.plugins.PluginManager - OS: Windows 8 
2015-02-25 08:54:01,229 [  88673]  ERROR - llij.ide.plugins.PluginManager - Last Action: NewProject 
2015-02-25 08:54:03,108 [  90552]  ERROR - llij.ide.plugins.PluginManager - null 
java.lang.AssertionError
    at com.android.tools.idea.wizard.DynamicWizard.init(DynamicWizard.java:125)
    at com.android.tools.idea.wizard.NewProjectWizardDynamic.init(NewProjectWizardDynamic.java:68)
    at com.android.tools.idea.actions.AndroidNewProjectAction.actionPerformed(AndroidNewProjectAction.java:38)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:164)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:266)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:926)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:236)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:105)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:512)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
    at java.awt.Component.processMouseEvent(Component.java:6516)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    at java.awt.Component.processEvent(Component.java:6281)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4872)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:740)
    at java.awt.EventQueue.access$300(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:699)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:713)
    at java.awt.EventQueue$4.run(EventQueue.java:711)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:710)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

EDIT: i reseted my compter to factory and Android Studio is fully working now

Upvotes: 2

Views: 6323

Answers (7)

Yogesh
Yogesh

Reputation: 1

All plugins, SDK setting was correct still faced the problem.

Applied following solution - on MAC

Give read write permission to .android folder

sudo chmod -R 777 .android

Upvotes: 0

varad lanke
varad lanke

Reputation: 21

I have solved this problem for my latest android studio

Method I ( Unhide the AppData ) :

  1. Show your hidden files from view -> hidden items(check it) you will see hidden folders & files as light color.
  2. Then go to C:\Users\john (instead of john, it should be your user name).
  3. Right click on "AppData"
  4. Just uncheck the Hidden box
  5. Move "sdk" folder from C:\Users\john\AppData\Local\Android to C:\Users\varad\AppData
  6. Open android studio, goto Configure-> Project defaults ->Project structure
  7. update new path of SDK like C:\Users\john\AppData\sdk Restart Android Studio.

Method II ( Move your SDK to another location) :

  1. Move "sdk" folder from C:\Users\john\AppData\Local\Android to any folder you want.
  2. Then update the SDK path in Android Studio from goto Configure-> Project defaults ->Project structure
  3. Restart Android Studio.

Upvotes: 0

nassim
nassim

Reputation: 428

This happened to me today after updating to the latest version. After this update I started getting the idea.jar problem and clicking on anything failed and gave the idea.jar error.

Tried to rename idea.jar file thinking the it would be detected during execution and request an update but the program didn't even load and gave a loading error.

To solve this, I only downloaded the latest stable windows (my current platform) executable only file (about 277Mbytes as of 143 build, no SDK since I have all the SDK files installed already) from the official android studio download page. Download Android Studio link

Reinstalled android studio and everything is working as normal

Upvotes: 0

luoc
luoc

Reputation: 41

I got the same issue running Android Studio on Ubuntu Gnome 15.10 as well as in a fresh install of Ubuntu 15.10 in a VM. I tried different versions of AS (1.51, 2.0). My SDK version is 24.4, that's at least what SDK manager says.

Whenever I try to set up a new project, AS freezes once I clicked the "next" button at the menu where you select the minimum api version.

Since this issue arises in completely independent environments it may be a configuration problem!?

idea.log

2016-02-24 21:53:16,008 [      0]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------ 
2016-02-24 21:53:16,011 [      3]   INFO -        #com.intellij.idea.Main - IDE: Android Studio (build #AI-141.2456560, 01 Dec 2015 00:00) 
2016-02-24 21:53:16,012 [      4]   INFO -        #com.intellij.idea.Main - OS: Linux (4.2.0-30-generic, amd64) 
2016-02-24 21:53:16,012 [      4]   INFO -        #com.intellij.idea.Main - JRE: 1.8.0_66-internal-b17 (Oracle Corporation) 
2016-02-24 21:53:16,012 [      4]   INFO -        #com.intellij.idea.Main - JVM: 25.66-b17 (OpenJDK 64-Bit Server VM) 
2016-02-24 21:53:16,014 [      6]   INFO -        #com.intellij.idea.Main - JVM Args: -Xbootclasspath/a:/opt/android-studio/bin/../lib/boot.jar -Xms256m -Xmx1280m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=225m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -da -Djna.nosys=true -Djna.boot.library.path= -Djna.debug_load=true -Djna.debug_load.jna=true -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Dawt.useSystemAAFontSettings=lcd -Djb.vmOptionsFile=/opt/android-studio/bin/studio64.vmoptions -XX:ErrorFile=/home/lukas/java_error_in_STUDIO_%p.log -Djb.restart.code=88 -Didea.paths.selector=AndroidStudio1.5 -Didea.platform.prefix=AndroidStudio 
2016-02-24 21:53:16,036 [     28]   INFO -        #com.intellij.idea.Main - JNA library loaded (64-bit) in 22 ms 
2016-02-24 21:53:16,317 [    309]   INFO - .intellij.idea.IdeaApplication - WM detected: GNOME Shell 
2016-02-24 21:53:16,318 [    310]   INFO - llij.openapi.wm.impl.X11UiUtil - impersonated WM: MUTTER_WM 
2016-02-24 21:53:17,479 [   1471]   INFO - llij.ide.plugins.PluginManager - 30 plugins initialized in 807 ms 
2016-02-24 21:53:17,479 [   1471]   INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: Android NDK Support (1.0), Android Support (10.1.5.1), CVS Integration (11), Copyright (8.1), Coverage, EditorConfig (1.0), Git Integration (8.1), GitHub, Google Analytics Uploader (1.0), Google App Indexing (0.1), Google Cloud Testing (1.0), Google Cloud Tools Core (0.2.8), Google Cloud Tools For Android Studio (0.2.8), Google Login (1.0), Google Services (0.1), Gradle, Groovy (9.0), I18n for Java, IDEA CORE, IntelliLang (8.0), JUnit (1.0), Java Bytecode Decompiler (0.1), Maven Integration, Properties Support, SDK Updater (1.0), Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), TestNG-J (8.0), hg4idea (10.0) 
2016-02-24 21:53:18,021 [   2013]   INFO - ellij.vfs.persistent.FSRecords - Marking VFS as corrupted 
2016-02-24 21:53:18,023 [   2015]   INFO - ellij.util.io.PagedFileStorage - lower=100; upper=200; buffer=10; max=1286340608 
2016-02-24 21:53:18,057 [   2049]   INFO - api.vfs.impl.local.FileWatcher - Starting file watcher: /opt/android-studio/bin/fsnotifier64 
2016-02-24 21:53:18,067 [   2059]   INFO - api.vfs.impl.local.FileWatcher - Native file watcher is operational. 
2016-02-24 21:53:18,305 [   2297]   INFO - .history.utils.LocalHistoryLog - local history version mismatch (was: 0, expected: 5), rebuilding... 
2016-02-24 21:53:18,305 [   2297]   INFO - .history.utils.LocalHistoryLog - FS has been rebuild, rebuilding local history... 
2016-02-24 21:53:19,060 [   3052]   INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342 
2016-02-24 21:53:19,724 [   3716]   INFO -                  TestNG Runner - Create TestNG Template Configuration 
2016-02-24 21:53:19,823 [   3815]   INFO - ellij.project.impl.ProjectImpl - 22 project components initialized in 412 ms 
2016-02-24 21:53:19,824 [   3816]   INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms 
2016-02-24 21:53:20,109 [   4101]   INFO - tellij.xml.Html5SchemaProvider - HTML5_SCHEMA_LOCATION = /opt/android-studio/lib/idea.jar!/resources/html5-schema/html5.rnc 
2016-02-24 21:53:20,109 [   4101]   INFO - tellij.xml.Html5SchemaProvider - XHTML5_SCHEMA_LOCATION = /opt/android-studio/lib/idea.jar!/resources/html5-schema/xhtml5.rnc 
2016-02-24 21:53:20,109 [   4101]   INFO - tellij.xml.Html5SchemaProvider - CHARS_DTD_LOCATION = /opt/android-studio/lib/idea.jar!/resources/html5-schema/html5chars.ent 
2016-02-24 21:53:21,392 [   5384]   INFO - pl.stores.ApplicationStoreImpl - 88 application components initialized in 3873 ms 
2016-02-24 21:53:21,412 [   5404]   INFO - .intellij.idea.IdeaApplication - App initialization took 8965 ms 
2016-02-24 21:53:22,560 [   6552]   WARN - dea.updater.SdkComponentSource - Couldn't find existing SDK 
2016-02-24 21:53:24,770 [   8762]   INFO - rtup.GradleSpecificInitializer - Found Studio home directory at: '/opt/android-studio' 
2016-02-24 21:53:24,770 [   8762]   INFO - rtup.GradleSpecificInitializer - Looking for Android SDK at '/opt/android-studio/sdk' 
2016-02-24 21:53:24,771 [   8763]   INFO - rtup.GradleSpecificInitializer - Looking for Android SDK at '/opt/sdk' 
2016-02-24 21:53:24,771 [   8763]   INFO - rtup.GradleSpecificInitializer - Unable to locate SDK within the Android studio installation. 
2016-02-24 21:53:24,771 [   8763]   INFO - rtup.GradleSpecificInitializer - Checking if ANDROID_HOME is set: 'ANDROID_HOME' is 'null' 
2016-02-24 21:53:24,772 [   8764]   INFO - rtup.GradleSpecificInitializer - Unable to locate last SDK used by Android tools 
2016-02-24 21:53:25,677 [   9669]   INFO - .startup.AndroidSdkInitializer - Found Studio home directory at: '/opt/android-studio' 
2016-02-24 21:53:25,677 [   9669]   INFO - .startup.AndroidSdkInitializer - Looking for Android SDK at '/opt/android-studio/sdk' 
2016-02-24 21:53:25,677 [   9669]   INFO - .startup.AndroidSdkInitializer - Looking for Android SDK at '/opt/sdk' 
2016-02-24 21:53:25,677 [   9669]   INFO - .startup.AndroidSdkInitializer - Unable to locate SDK within the Android studio installation. 
2016-02-24 21:53:25,677 [   9669]   INFO - .startup.AndroidSdkInitializer - Checking if ANDROID_HOME is set: 'ANDROID_HOME' is 'null' 
2016-02-24 21:53:25,677 [   9669]   INFO - .startup.AndroidSdkInitializer - Unable to locate last SDK used by Android tools 
2016-02-24 21:57:22,383 [ 246375]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE SHUTDOWN ------------------------------------------------------ 
2016-02-24 21:57:22,407 [ 246399]   INFO - il.indexing.FileBasedIndexImpl - START INDEX SHUTDOWN 
2016-02-24 21:57:22,448 [ 246440]   INFO - il.indexing.FileBasedIndexImpl - END INDEX SHUTDOWN 
2016-02-24 21:57:22,452 [ 246444]   INFO - org.jetbrains.io.BuiltInServer - web server stopped 
2016-02-24 21:57:22,452 [ 246444]   INFO - stubs.SerializationManagerImpl - START StubSerializationManager SHUTDOWN 
2016-02-24 21:57:22,453 [ 246445]   INFO - stubs.SerializationManagerImpl - END StubSerializationManager SHUTDOWN 
2016-02-24 21:57:22,461 [ 246453]   INFO - newvfs.persistent.PersistentFS - VFS dispose started 
2016-02-24 21:57:22,462 [ 246454]   INFO - newvfs.persistent.PersistentFS - VFS dispose completed 

Further more AS showed two issue warnings on first run of the configuration wizard:

"OpenJDK shows intermittent performance and UI issues. We recommend using the Oracle JRE/JDK"

"IBus prior to 1.5.11 may cause input problem. See IDEA-78860 for details."

If it's necessary I can also upload the thread bump files.

Upvotes: 1

Devesh
Devesh

Reputation: 1

http://code.google.com/p/android/issues/detail?id=72248

This happens when Android Studio does not know where the Android SDK is. Please do this:

check your android SDKs Path. move main window -> configure -> Project Defaults -> Project Structure. and "Android SDK location" set to your target location.

Upvotes: 0

Adnan Ali
Adnan Ali

Reputation: 802

first set JAVE_HOME variable. you can do like this.. Computer-> properties-> Advance System settings ->Environment variables ->new then in variable name write JAVA_HOME and in path field write your jdk's bin path

for more detail check this link Environment variables for java installation

after setting environment variable if there is still problem in creating project then inform us.

Upvotes: 0

user2947605
user2947605

Reputation:

After installing android studio, it is necessary to set up the needed path variables.

So in your Path variable add an path to the android sdk, you can find your sdk-path by running android studio and selecting the SDK manager and up at the top there will be your path variable for the android sdk, copy that location and then add it to your path.

Now you probably have a java path set up, however you need to create a new system variable and name it JAVA_HOME and there you'll add the path to your jdk again.

After those two steps are done, you should be able to run android studio and start a new project.

Upvotes: 0

Related Questions