I have just published my first app today but for some reason when I use the published version I keep getting a ClassNotFoundException error when it starts up. It works fine when I test it in debug mode on my phone so I'm not sure whats causing this.
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.androidProjects.personal/com.androidProjects.personal.GAAClubFinderActivity}: java.lang.ClassNotFoundException: com.androidProjects.personal.GAAClubFinderActivity
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2141)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2260)
at android.app.ActivityThread.access$600(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:5045)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.androidProjects.personal.GAAClubFinderActivity
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1039)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2132)
... 11 more
Any Ideas?
Related
I am gettig below error while running job through azure pipeline. I have tried to increase MaxMetaSpaceSize using below command but still its not working.
JAVA_OPTS="-Xms512m -Xmx1024m -XX:MetaspaceSize=512M -XX:MaxMetaspaceSize=1024m -Djava.net.preferIPv4Stack=true"
Error:
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by:
org.junit.platform.commons.JUnitException: Error executing tests for engine junit-jupiter
at app//org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:57)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
... 30 more
Caused by:
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError
at java.base/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
... 31 more
Caused by:
java.lang.OutOfMemoryError
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:603)
i'm using eclipse Version: 2022-12 (4.26.0) on windows 11 and i tried installing javafx latest release on it for a project i've done 2 years ago. i've installed according to: https://pragmaticways.com/how-to-add-javafx-to-eclipse-the-easy-way/
and got the error:
Graphics Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics#19/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:283)
at javafx.graphics#19/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:253)
at javafx.graphics#19/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:268)
at javafx.graphics#19/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
at javafx.graphics#19/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)
at javafx.graphics#19/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659)
at javafx.graphics#19/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:410)
at javafx.graphics#19/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:364)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1082)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics#19/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:95)
at javafx.graphics#19/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1082)
Caused by: java.lang.RuntimeException: No toolkit found
at javafx.graphics#19/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:280)
at javafx.graphics#19/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
at javafx.graphics#19/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)
at javafx.graphics#19/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659)
at javafx.graphics#19/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:410)
at javafx.graphics#19/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:364)
... 5 more
couldn't find a related problem for it i downloaded java fx 19 SDK from https://gluonhq.com/products/javafx/
What could be the reason for that?
i tried the solution from this topic: Error initializing QuantumRenderer: no suitable pipeline found in Eclipse JavaFX
but still doesn't work.
In Firebase crashlytics, I am getting the following information about the crash.
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myawesomeapp/com.example.myawesomeapp.MainActivity}: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/base.apk", zip file "/data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/split_config.en.apk", zip file "/data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/split_config.es.apk", zip file "/data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/split_config.x86.apk", zip file "/data/app/com.example.myawesomeapp-zqi6k7PQCL8VlHwCIoANUA==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/lib/x86, /data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/base.apk!/lib/x86, /data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/split_config.en.apk!/lib/x86, /data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/split_config.es.apk!/lib/x86, /data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/split_config.x86.apk!/lib/x86, /data/app/com.example.myawesomeapp-zqi6k7PQCL8VlHwCIoANUA==/split_config.xxhdpi.apk!/lib/x86, /system/lib, /system/vendor/lib]]] couldn't find "libflutter.so"
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I am new to programming. Please bear with me. I tried developing spinner class on an existing activity with other views. However due to some error, the execution failed. I deleted all stuffs related to spinner class in
activitymain.java
main_activity.xml (in my case different name, this for easier
understanding)
and every other detail related to spinner view
Now, when I am trying to execute the activity with existing views, I am getting the following error. Still not getting a hint of what happened and how this can be resolved
So here's what the logcat is displaying
02-14 04:41:29.341 20105-20105/com.example.bharathduraiswamy.comboedittext E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.bharathduraiswamy.comboedittext/com.example.bharathduraiswamy.comboedittext.MainActivity}: java.lang.InstantiationException: can't instantiate class com.example.bharathduraiswamy.comboedittext.MainActivity
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2239)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365)
at android.app.ActivityThread.access$600(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5336)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.InstantiationException: can't instantiate class com.example.bharathduraiswamy.comboedittext.MainActivity
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2230)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365)
at android.app.ActivityThread.access$600(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5336)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Your activity lacks default (with no parameters) constructor or throws some exception in the constructor.
ok, i am good. Overcame the errors and got the reason behind the error. Defined mainactivity.java as abstract but abstract classes can't be instantiated.
I believe the abstract was created when trying to implement onItemSelectListener() and I failed to delete it when deleting everything related to spinner view
Regards
I am trying to port a native Android app to BB10 OS (BlackBerry). I was able to install the app but when I launch it, I see this error:
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to create application com.example.MyApplication: java.lang.SecurityException: Failed to open /dev/urandom for writing
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4454)
at android.app.ActivityThread.access$1300(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5116)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.SecurityException: Failed to open /dev/urandom for writing
at o.dD$if.Ë‹(:279)
at o.dD$if.engineSetSeed(:215)
at java.security.SecureRandom.setSeed(SecureRandom.java:243)
at java.security.SecureRandom.setSeed(SecureRandom.java:258)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at o.ff$Õ™.<clinit>(Unknown Source)
at o.dA.ËŠ(:285)
at o.dA.<init>(:99)
at o.dA.ËŠ(:151)
at com.example.MyApplication.ͺ(:182)
at com.example.MyApplication.onCreate(:66)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4451)
... 10 more
Caused by: java.io.FileNotFoundException: /dev/urandom: open failed: EACCES (Permission denied)
at libcore.io.IoBridge.open(IoBridge.java:409)
at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
at o.dD$if.Ë‹(:277)
... 23 more
Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:393)
... 26 more
W/ActivityManager(6766745): Force finishing activity com.example.android.agent/com.example.agent.activities.LaunchActivity
E/OrientationUtil(6766745): Unable to read sensor data. errno 11
D/dalvikvm(20689057): GC_CONCURRENT freed 307K, 5% free 10097K/10576K, paused 1ms+1ms, total 48ms
Any insights into addressing this issue is highly appreciated.