I just upgrade my Android Studio from 1.5 to 2.3, i just unzipped the folder and copied in the download folder, now when I'm starting android studio, I'm getting this message:
Internal Error. Please report to https://code.google.com/p/android/issues
java.lang.RuntimeException: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.android.tools.idea.AndroidInitialConfigurator'
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:203)
at com.intellij.idea.MainImpl$1.lambda$null$0(MainImpl.java:47)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:358)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.android.tools.idea.AndroidInitialConfigurator'
at com.intellij.ide.plugins.PluginManager.handleComponentError(PluginManager.java:248)
at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.handleInitComponentError(PlatformComponentManagerImpl.java:43)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:536)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:119)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$createComponents$8(ApplicationImpl.java:429)
at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
at com.intellij.openapi.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:436)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:103)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:392)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:384)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:196)
... 16 more
Caused by: java.lang.NoSuchMethodError: com.android.prefs.AndroidLocation.checkAndroidSdkHome()V
at com.android.tools.idea.startup.GradleSpecificInitializer.checkAndroidSdkHome(GradleSpecificInitializer.java:345)
at com.android.tools.idea.startup.GradleSpecificInitializer.run(GradleSpecificInitializer.java:116)
at com.android.tools.idea.AndroidInitialConfigurator.activateAndroidStudioInitializerExtensions(AndroidInitialConfigurator.java:198)
at com.android.tools.idea.AndroidInitialConfigurator.<init>(AndroidInitialConfigurator.java:65)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getComponentInstance(CachingConstructorInjectionComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:495)
... 28 more
I googled a lot and found some solutions like:
1) restart the computer, didn't work
2) turn off internet and then start, didn't work
3) remove .Android1.5 folder, didn't work
I'm wondering what is the solution now, I'm unable to do anything right now! If anyone has solved this issue, please let me know what is the best solutions?
System config
Ubuntu 16.04
Ram 8 GB
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
It seems like a dependency from the android-sdk could not be loaded.
This part of the error message above is ultra important:
Caused by: java.lang.NoSuchMethodError: com.android.prefs.AndroidLocation.checkAndroidSdkHome()V
I first tried to install the android sdk which did not help.
Thank I just added the ppa with:
sudo add-apt-repository ppa:maarten-fonville/android-studio
and installed android-studio with apt-get with:
sudo apt-get update
sudo apt-get install android-studio
After that it worked for me.
Related
I have created a android application in visual studio 2015
when i go into layout and open Main.axml
I will get the following error.
Sometimes this error
java.lang.UnsatisfiedLinkError: C:\Users\Strangers_Call\AppData\Local\Temp\AndroidDesigner3364567969202547439.dll:
Can't load AMD 64-bit .dll on a IA 32-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at mono.android.JniHelper.loadEmbeddedJniLibrary(JniHelper.java:28)
at mono.android.D3DImageFactory.<clinit>(D3DImageFactory.java:14)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at mono.android.DesignerSession.initializePlatformSpecific(DesignerSession.java:86)
at mono.android.DesignerSession.<init>(DesignerSession.java:75)
at mono.android.Project.createSession(Project.java:382)
at mono.android.Project.processMessage(Project.java:414)
at mono.android.MessageListener.executeMessage(MessageListener.java:88)
at mono.android.MessageListener$Runner.run(MessageListener.java:44)
at java.lang.Thread.run(Thread.java:748)
And sometimes this one
java.lang.UnsatisfiedLinkError: C:\Users\Strangers_Call\AppData\Local\Temp\AndroidDesigner3364567969202547439.dll:
Can't load AMD 64-bit .dll on a IA 32-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at mono.android.JniHelper.loadEmbeddedJniLibrary(JniHelper.java:28)
at mono.android.D3DImageFactory.<clinit>(D3DImageFactory.java:14)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at mono.android.DesignerSession.initializePlatformSpecific(DesignerSession.java:86)
at mono.android.DesignerSession.<init>(DesignerSession.java:75)
at mono.android.Project.createSession(Project.java:382)
at mono.android.Project.processMessage(Project.java:414)
at mono.android.MessageListener.executeMessage(MessageListener.java:88)
at mono.android.MessageListener$Runner.run(MessageListener.java:44)
at java.lang.Thread.run(Thread.java:748)
can anyone tell me how to resolve this issue??
UnsatisfiedLinkError is thrown if the Java Virtual Machine cannot find
an appropriate native-language definition of a method declared native.
C:\Users\Strangers_Call\AppData\Local\Temp\AndroidDesigner3364567969202547439.dll file in your case appears to be 64-bit whereas your system runs on 32-bit. Hence, the system can not load this file and you are getting the error.
java.lang.NoClassDefFoundError: com/microsoft/alm/plugin/services/AsyncService
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.intellij.openapi.components.impl.ComponentManagerImpl.registerComponents(ComponentManagerImpl.java:412)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:96)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:458)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:450)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:197)
at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:52)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ClassNotFoundException: com.microsoft.alm.plugin.services.AsyncService PluginClassLoader[com.microsoft.vso.idea, 1.116.1]
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:64)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 23 more
I want to add the plugin using one of the both flow. Please help.
I want to add Visual Studio Team Service Plugin in Android studio.
Here I have 2 issues -
If I try install this plugin from Setting>Plugin>Browse Repo> then error message is "Download failed " with can't Read message.
If I download Plugin from https://plugins.jetbrains.com/plugin/7981-visual-studio-team-services and add jar file using Setting > Plugins > Install plugin from disk. Plugin is added. But If i restart the Android studio than getting this error message -
Plugin 'com.microsoft.vso.idea' failed to initialize and will be disabled. Please restart Android Studio.
In the second case, you probably downloaded plugin.idea-1.xxx.zip file, extracted the content, clicked Install plugin from disk in android studio and then you picked a .jar file from the extracted content called com.microsoft.alm.plugin.idea-1.xxx.jar and that is what caused the error you posted. What you should have done is picking the .zip file itself without unzipping it, this will cause no errors and the plugin will work correctly.
I hope this is helpful.
I started using Android Studio after a couple of days, Suddenly Android Studio didn't start . When I started it through terminal i.e "Studio" Command. Got the Following Error.
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Start Failed: Internal Error. Please report to https://https://code.google.com/p/android/issues
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
at com.intellij.idea.Main.main(Main.java:103)
Caused by: java.lang.UnsatisfiedLinkError: /usr/lib/jvm/jdk1.8.0_91/jre/lib/i386/libawt_xawt.so: libXrender.so.1: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at java.awt.Toolkit$3.run(Toolkit.java:1636)
at java.awt.Toolkit$3.run(Toolkit.java:1634)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
at java.awt.Toolkit.<clinit>(Toolkit.java:1668)
at java.awt.Cursor.<clinit>(Cursor.java:195)
at javax.swing.text.html.HTMLEditorKit.<clinit>(HTMLEditorKit.java:623)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:97)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:71)
... 6 more
Also, an UI exception occurred on attempt to show above message:
java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
at java.awt.Component.<clinit>(Component.java:593)
at com.intellij.idea.Main.showMessage(Main.java:336)
at com.intellij.idea.Main.showMessage(Main.java:312)
at com.intellij.idea.Main.showMessage(Main.java:291)
at com.intellij.idea.Main.main(Main.java:106)
I have re-installed java 7 and java 8 both . Also Reinstalled Android Studio. But still there was no help.
I had installed octave before, was that a problem?
To resolve the problem you should install JDK 64bit. From the comments, you have installed 32-bit JDK
I was having the same issue. I killed the app and reopened. It fixed the issue for me.
I install an Android develop environment in ubuntu15,after installing JDK,and SDK tools,run studio.sh,it reports some error info:
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Start Failed: Internal Error. Please report to https://code.google.com/p/android/issues
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
at com.intellij.idea.Main.main(Main.java:92)
Caused by: java.lang.UnsatisfiedLinkError: /home/xhk/java/jdk1.8.0_60/jre/lib/i386/libawt_xawt.so: libXtst.so.6:
cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1842)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at java.awt.Toolkit$3.run(Toolkit.java:1636)
at java.awt.Toolkit$3.run(Toolkit.java:1634)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
at java.awt.Toolkit.<clinit>(Toolkit.java:1668)
at java.awt.Cursor.<clinit>(Cursor.java:195)
at javax.swing.text.html.HTMLEditorKit.<clinit>(HTMLEditorKit.java:623)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:96)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:72)
... 6 more
Also, an UI exception occurred on attempt to show above message:
java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
at java.awt.Component.<clinit>(Component.java:593)
at com.intellij.idea.Main.showMessage(Main.java:248)
at com.intellij.idea.Main.showMessage(Main.java:234)
at com.intellij.idea.Main.showMessage(Main.java:224)
at com.intellij.idea.Main.main(Main.java:95)
but libawt_xawt.so, libXtst.so.6 have existed,PATH has been set
$ locate libawt_xawt.so
/home/xhk/java/jdk1.8.0_60/jre/lib/i386/libawt_xawt.so
$ locate libXtst.so.6
/usr/lib/x86_64-linux-gnu/libXtst.so.6
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
$ echo$PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/xhk/java/jdk1.8.0_60/bin:/home/xhk/java/jdk1.8.0_60/jre/bin:/home/xhk/android/android-sdk-linux:/home/xhk/android/android-sdk-linux/tools:/home/xhk/android/android-sdk-linux/platform-tools
How can i fix it? o.0
You seem to have installed the 32 bit version of the java SDK as indicated by this line:
/home/xhk/java/jdk1.8.0_60/jre/lib/i386/libawt_xawt.so
But your system is a 64 bit system as indicated by these lines
/usr/lib/x86_64-linux-gnu/libXtst.so.6
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
There are two solutions. The first is to install the 64 bit version of the java jdk. The second is to install the 32 bit version of the libXtst
sudo apt-get install libxtst6:i386
I would prefer the first option
I am getting an error while trying to run an android application. I am running android studio 0.3.2 on Windows 8 64-bit.
Here's the error
java: System Java Compiler was not found in classpath:
java.lang.ClassNotFoundException: com.sun.tools.javac.api.JavacTool
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:79)
at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:375)
at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:278)
at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:190)
at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:162)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1087)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:798)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:846)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:761)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:582)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:343)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:183)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:129)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:224)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Help appreciated!
As people suggested in comments, you should install JDK.
To maintain the difference, refer to: What is the difference between JDK and JRE?.
There are a lot of guides on the internet but the easiest way to install JDK is to visit Oracle Downloads page and install the required one.
After installing read official guide how to set up environment.
Also, this question is answered in SO: How to set JAVA_HOME on Windows 7?
After this, Intellij IDEA (Android Studio) will fetch JDK automatically.
If not, go to Project Structure and set up JDK path manually: