I am trying to develop an app from meteor.js. I am able to compile and run on Apple devices. But when I try to run on android (meteor run android-device) I get the below error message from terminal. I have tried googling the issue but still could not get a fix!.
Status of the individual requirements:
✓ Java JDK
✓ Android SDK
✗ Android target: avdmanager: Command failed with exit code 1 Error output:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 5 more
✓ Gradle
This is what I did:
meteor remove-platform android
As mentioned by #SamaahRasheed I then went to Android Studio and updated it:
Android Studio > Check for updates
and then also updated everything else Android Studio then recommended I update as well.
Then I made sure JAVA_HOME was at least java 8
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
Then I re-added android platform:
meteor add-platform android
It may be that one of these was more important than the others, but this worked.
Related
When I run flutter doctor to check if everything is good I find this problem " Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.", and when I run flutter doctor --android-licenses previously is show up Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at com.android.repository.api.RemoteListSourceProvider.create(RemoteListSourceProvider.java:51) at com.android.sdklib.repository.AndroidSdkHandler$RepoConfig.<init>(AndroidSdkHandler.java:626) at com.android.sdklib.repository.AndroidSdkHandler.getRepoConfig(AndroidSdkHandler.java:572) at com.android.sdklib.repository.AndroidSdkHandler.getSdkManager(AndroidSdkHandler.java:295) at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.setSdkHandler(SdkManagerCliSettings.java:101) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.<init>(SdkManagerCli.java:95) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:74) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 8 more
but after I use this command JAVA_OPTS=-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee ,this what I get
Error: Could not find or load main class '-XX:+IgnoreUnrecognizedVMOptions Caused by: java.lang.ClassNotFoundException: '-XX:+IgnoreUnrecognizedVMOptions
How I can fix all of these problems?
NOTE: Android SDK Tools (Obsolete) 26.1.1 is installed on my android studio
try updating your jdk version to the latest and setting jdk path again. also, set JAVA_HOME and make sure build gradle is completed successfuly in android studio. update sdk tools to the latest version and try again.
I'm trying to sign my application on Windows 10 using the following command.
java -jar signapk.jar platform.x509.pem platform.pk8 not_sign.apk sign.apk
And it gives me the following error, please help me !!
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.conscrypt.OpenSSLBIOInputStream.(OpenSSLBIOInputStream.java:34)
at org.conscrypt.OpenSSLX509Certificate.fromX509PemInputStream(OpenSSLX509Certificate.java:119)
at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:220)
at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:216)
at org.conscrypt.OpenSSLX509CertificateFactory$Parser.generateItem(OpenSSLX509CertificateFactory.java:94)
at org.conscrypt.OpenSSLX509CertificateFactory.engineGenerateCertificate(OpenSSLX509CertificateFactory.java:272)
at java.security.cert.CertificateFactory.generateCertificate(Unknown
Source)
at com.android.signapk.SignApk.readPublicKey(SignApk.java:184)
at com.android.signapk.SignApk.main(SignApk.java:1007) Caused by: java.lang.IllegalArgumentException: Failed to load any of the
given libraries: [conscrypt_openjdk_jni-windows-x86_64,
conscrypt_openjdk_jni]
at org.conscrypt.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:160)
at org.conscrypt.NativeCryptoJni.init(NativeCryptoJni.java:49)
at org.conscrypt.NativeCrypto.(NativeCrypto.java:53)
... 9 more
I found some solutions but they are all using Linux instead of Windows. Because of the limitation of my company, Windows is a must.
I started a Maven project in Java 8 and wanted to migrate it to Java 9. At the same time I also went from Eclipse Neon EE to Eclipse Oxygen EE. (JFX SDK reinstalled).
While the Eclipse Workspace shows no errors; as soon as I try to compile and run the exact same program that used to run perfectly fine in Java 8, I get the following Exception:
{...}
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.css.converters.PaintConverter
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 26 more
Exception running application application.Main
I have now rebuilt the project several times and cannot get it to work...
In Java 9, the previous internal class
com.sun.javafx.css.converters.PaintConverter
became public as
javafx.css.converter.PaintConverter in the module javafx.graphics.
See Javadoc - Class PaintConverter.
JFoenix supports Java 9 with a separate JAR.
I recently updated my system from Mavericks (OSX) to Yosemite. I use to be able to right click on a test and run it. Now I get the exception
/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java -ea -Didea.launcher.port=7541 "-Didea.launcher.bin.path=/Applications/Android Studio.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/Android Studio.app/Contents/lib/idea_rt.jar:/Applications/Android Studio.app/Contents/plugins/junit/lib/junit-rt.jar:/Users/michael.cameron/Code/Android/sdk/platforms/android-21/android.jar:/Users/michael.cameron/Code/Android/sdk/platforms/android-21/data/res:/Users/michael.cameron/Code/Android/darxstudios/TheChefsCodex/app/build/intermediates/classes/debug:/Users/michael.cameron/Code/Android/darxstudios/TheChefsCodex/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.3/classes.jar:/Users/michael.cameron/Code/Android/darxstudios/TheChefsCodex/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.3/res:/Users/michael.cameron/Code/Android/darxstudios/TheChefsCodex/app/libs/ParseCrashReporting-1.8.0.jar:/Users/michael.cameron/Code/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/21.0.3/support-annotations-21.0.3.jar:/Users/michael.cameron/Code/Android/darxstudios/TheChefsCodex/app/build/intermediates/exploded-aar/com.android.support/support-v4/21.0.3/res:/Users/michael.cameron/Code/Android/darxstudios/TheChefsCodex/app/build/intermediates/exploded-aar/com.android.support/support-v4/21.0.3/classes.jar:/Users/michael.cameron/Code/Android/darxstudios/TheChefsCodex/app/build/intermediates/exploded-aar/com.android.support/support-v4/21.0.3/libs/internal_impl-21.0.3.jar:/Users/michael.cameron/Code/Android/darxstudios/TheChefsCodex/app/libs/Parse-1.8.0.jar:/Users/michael.cameron/.gradle/caches/modules-2/files-2.1/com.parse.bolts/bolts-android/1.1.4/129874135e6081269ace2312092031558865de12/bolts-android-1.1.4.jar:/Users/michael.cameron/Code/Android/darxstudios/TheChefsCodex/app/libs/bolts-android-1.1.4.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 com.darxstudios.thechefscodex.ApplicationTest
Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/ResultPrinter
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:191)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:116)
Caused by: java.lang.ClassNotFoundException: junit.textui.ResultPrinter
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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 3 more
it may also be related to when i tap the open Android Studio icon in my Dock i get the error no JVM was found but i can open it via Terminal no problem.
This is the same as a brand new android studio project with the default applicationTest trying to run.
So two things
First, if you try to open Android Studio on Yosemite upgrade and it says "No JVM found" you need to install the java 6 for osx here as Android requires java 1.6 and not java 1.6+.
Second, The Exception I found was caused because it was trying to run JUnit as if I wanted to run through java standard console instead of with Android.
Do not use the Java test that contains a black with arrows, use the unit tests within a Android Tests and delete all uses of the JUnit configuration.
Your configuration should look like this, then you can right click on single tests and run them like normal.
As of the release of Android Studio 1.1.0 (on Feb 18 2015), it is now possible to run standard JUnit tests in Android Studio on local JVM for as long as the code under test isn't calling Android API. Please follow the instructions in this guide for more info.
For 3 days now, I have been trying to install glassfish 4.1 on eclipse Luna version 4.4.1. I first installed the plugin from eclipse marketplace then added it in my runtime using jdk 8. I also made jdk my default since eclipse default uses jre. I have to point out that I have been been using glassfish on netbeans and tomcat on eclipse but I decided to play around with glassfish on eclipse. Every information I got on the internet didn't fix my issue.
Below is the error I got in the console. Right now, this is driving me nuts so I have decided to come to you for direction.
Thanks
Launching GlassFish on Felix platform
ERROR: Unable to create cache directory: C:\Program Files\glassfish-4.1\glassfish\domains\domain1\osgi-cache\felix
ERROR: Error creating bundle cache. (java.lang.RuntimeException: Unable to create cache directory.)
java.lang.RuntimeException: Unable to create cache directory.
at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:131)
at org.apache.felix.framework.Felix.init(Felix.java:640)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Exception in thread "Thread-1" java.lang.RuntimeException: org.osgi.framework.BundleException: Error creating bundle cache.
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:90)
Caused by: org.osgi.framework.BundleException: Error creating bundle cache.
at org.apache.felix.framework.Felix.init(Felix.java:645)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Caused by: java.lang.RuntimeException: Unable to create cache directory.
at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:131)
at org.apache.felix.framework.Felix.init(Felix.java:640)
... 1 more
Exception in thread "main" 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:483)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: org.glassfish.embeddable.GlassFishException: java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:170)
at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime.java:157)
at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.java:110)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:112)
... 6 more
Caused by: java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.newFramework(OSGiGlassFishRuntimeBuilder.java:241)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:135)
... 9 more
Error stopping framework: java.lang.NullPointerException
java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher$1.run(GlassFishMain.java:203)
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
Run Eclipse or any other IDE you use in Administrator mode.
Works for me.
I think your comment deserves to be posted as the main answer but I have been trying to mark your comment as answer but I wash't able to. So I decided to post post your comment here and then back it up with my own experience.
Answer by unwichtich:
I guess this is a similar problem. The cause may be that you have installed Glassfish in c:\Program Files. You can try to move your Glassfish installation to a directory where your normal user account has full access rights but you then have to change the path to the Glassfish installation in Eclipse.
My own experience:
Turns out that all the problems I had with the glassfish server (including exit code 1 error) was because glassfish could not handle folder names with spaces in it. So I moved the glassfish-4.1 folder from C:\Program File\glassfish-4.1.. path to C:\ glassfish-4.1.. It wiped all my tears away. This is really important in eclipse and netbeans IDEs (if you are installing the netbeans that does not come with a glassfish bundled zip).
I had the same problem and fixed it by installing Glassfish under C:\ instead of C:\Program Files. Try that.
use JDk 7 instead of JDK 8 am also faced the same issue i just changed to jdk7 its working now.