java.lang.RuntimeException: Unable to get provider android.arch.lifecycle.LifecycleRuntimeTrojanProvider - android-studio

My app keeps crashing and this error keeps popping up when my app is run on a API level 19 device after I updated Android Studio to 3.0. This app worked fine with previous Android Studio. Also the app works fine with API level 24 device now.
P.S. - I know this question was asked some times before and its a duplicate. But none of the solutions worked for me.
java.lang.RuntimeException: Unable to get provider android.arch.lifecycle.LifecycleRuntimeTrojanProvider: java.lang.ClassNotFoundException: Didn't find class "android.arch.lifecycle.LifecycleRuntimeTrojanProvider" on path: DexPathList[[zip file "/data/app/com.bayasys.bayatrade.mobile-76.apk"],nativeLibraryDirectories=[/data/app-lib/com.bayasys.bayatrade.mobile-76, /vendor/lib, /system/lib]]
at android.app.ActivityThread.installProvider(ActivityThread.java:5236)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4828)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4711)
at android.app.ActivityThread.access$1600(ActivityThread.java:175)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1368)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5602)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.arch.lifecycle.LifecycleRuntimeTrojanProvider" on path: DexPathList[[zip file "/data/app/com.bayasys.bayatrade.mobile-76.apk"],nativeLibraryDirectories=[/data/app-lib/com.bayasys.bayatrade.mobile-76, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.ActivityThread.installProvider(ActivityThread.java:5221)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4828) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4711) 
at android.app.ActivityThread.access$1600(ActivityThread.java:175) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1368) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:146) 
at android.app.ActivityThread.main(ActivityThread.java:5602) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) 
at dalvik.system.NativeStart.main(Native Method) 

I faced the similar issue. I solved it by extending my Application class to MultidexApplication.

Related

Android Studio app says it stopped over and over again

Last time I opened the project, it was working but now the app keeps stopping. I didn't even change any code as far as I remember. I can't even open the app now
2022-06-07 21:06:18.942 7244-7244/com.example.labactivity01layoutsandactivity E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.labactivity01layoutsandactivity, PID: 7244
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.labactivity01layoutsandactivity/com.example.labactivity01layoutsandactivity.MainActivity}: java.lang.IllegalStateException: Activity com.example.labactivity01layoutsandactivity.MainActivity#661d5fe does not have a NavController set on 2131231012
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.lang.IllegalStateException: Activity com.example.labactivity01layoutsandactivity.MainActivity#661d5fe does not have a NavController set on 2131231012
at androidx.navigation.Navigation.findNavController(Navigation.java:61)
at androidx.navigation.ActivityKt.findNavController(Activity.kt:30)
at com.example.labactivity01layoutsandactivity.MainActivity.onCreate(MainActivity.kt:26)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)

Android Studio does not open. Just stopped loading on 60% to 70%

I am trying to open my Android Studio 1.2 in Windows 8.1 64bit system. But it's not opening. It was working fine befor two days ago but now I am facing this issue.
many times I reinstalled it
change JDK path
enabled VT-X from BIOS
As you can see on above image that it is stopping here everytime.
After 2 hrs of loading it's giving me below error log.
`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.intellij.openapi.util.registry.RegistryState'
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:178)
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:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:362)
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.intellij.openapi.util.registry.RegistryState'
at com.intellij.ide.plugins.PluginManager.handleComponentError(PluginManager.java:248)
at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.handleInitComponentError(PlatformComponentManagerImpl.java:39)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:590)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:610)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:245)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:211)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponent(ComponentManagerImpl.java:125)
at com.intellij.openapi.application.impl.ApplicationImpl.createComponent(ApplicationImpl.java:359)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:116)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:87)
at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:101)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:504)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:486)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:170)
... 16 more
Caused by: java.lang.ExceptionInInitializerError
at com.intellij.openapi.vfs.LocalFileSystem.getInstance(LocalFileSystem.java:44)
at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl$1.beforeFileBasedStorageCreate(ApplicationStoreImpl.java:85)
at com.intellij.openapi.components.impl.stores.StateStorageManagerImpl.createFileStateStorage(StateStorageManagerImpl.java:212)
at com.intellij.openapi.components.impl.stores.StateStorageManagerImpl.createStateStorage(StateStorageManagerImpl.java:185)
at com.intellij.openapi.components.impl.stores.StateStorageManagerImpl.getStateStorage(StateStorageManagerImpl.java:102)
at com.intellij.openapi.components.impl.stores.ComponentStoreImpl.initPersistentComponent(ComponentStoreImpl.java:315)
at com.intellij.openapi.components.impl.stores.ComponentStoreImpl.initComponent(ComponentStoreImpl.java:75)
at com.intellij.openapi.application.impl.ApplicationImpl.initializeComponent(ApplicationImpl.java:182)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:566)
... 27 more
Caused by: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.intellij.openapi.vfs.newvfs.ManagingFS'
at com.intellij.ide.plugins.PluginManager.handleComponentError(PluginManager.java:248)
at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.handleInitComponentError(PlatformComponentManagerImpl.java:39)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:590)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:610)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:245)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:211)
at org.picocontainer.defaults.BasicComponentParameter.resolveInstance(BasicComponentParameter.java:77)
at org.picocontainer.defaults.ComponentParameter.resolveInstance(ComponentParameter.java:114)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:257)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:217)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at com.intellij.util.pico.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:550)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:610)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:245)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:211)
at org.picocontainer.defaults.CollectionComponentParameter.getArrayInstance(CollectionComponentParameter.java:268)
at org.picocontainer.defaults.CollectionComponentParameter.resolveInstance(CollectionComponentParameter.java:127)
at org.picocontainer.defaults.ComponentParameter.resolveInstance(ComponentParameter.java:116)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:257)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:217)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at com.intellij.util.pico.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:550)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:610)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:245)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:211)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentFromContainer(ComponentManagerImpl.java:168)
at com.intellij.openapi.application.impl.ApplicationImpl.getComponentFromContainer(ApplicationImpl.java:538)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:199)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:194)
at com.intellij.openapi.vfs.VirtualFileManager.getInstance(VirtualFileManager.java:44)
at com.intellij.openapi.vfs.LocalFileSystem$LocalFileSystemHolder.<clinit>(LocalFileSystem.java:40)
... 36 more
Caused by: java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at java.io.PrintWriter.<init>(PrintWriter.java:116)
at java.io.PrintWriter.<init>(PrintWriter.java:100)
at org.apache.log4j.DefaultThrowableRenderer.render(DefaultThrowableRenderer.java:58)
at org.apache.log4j.spi.ThrowableInformation.getThrowableStrRep(ThrowableInformation.java:87)
at org.apache.log4j.spi.LoggingEvent.getThrowableStrRep(LoggingEvent.java:413)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:313)
at org.apache.log4j.RollingFileAppender.subAppend(RollingFileAppender.java:276)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.info(Category.java:683)
at com.intellij.idea.IdeaLogger.info(IdeaLogger.java:185)
at com.intellij.openapi.diagnostic.Logger.info(Logger.java:97)
at com.intellij.util.io.PersistentEnumeratorBase.<init>(PersistentEnumeratorBase.java:212)
at com.intellij.util.io.PersistentBTreeEnumerator.<init>(PersistentBTreeEnumerator.java:82)
at com.intellij.util.io.PersistentEnumeratorDelegate.<init>(PersistentEnumeratorDelegate.java:38)
at com.intellij.util.io.PersistentStringEnumerator.<init>(PersistentStringEnumerator.java:53)
at com.intellij.util.io.PersistentStringEnumerator.<init>(PersistentStringEnumerator.java:46)
at com.intellij.util.io.PersistentStringEnumerator.<init>(PersistentStringEnumerator.java:32)
`
Please give me suggestion how can i solve this issue.
Try turning off the firewall and try again.
Check Java is installed properly and set the java home properly.

Cardboard SDK Crash

Just download Cardboard demo. Build to Android device. Launch it and get a crash log. Anyone know the issue?
Thanks.
01-24 15:24:12.468 7271-7271/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.Error: FATAL EXCEPTION [main]
Unity version : 4.6.0b20
Device model : Xiaomi HM 1SW
Device fingerprint: Xiaomi/armani/armani:4.3/JLS36C/JHCMIBH45.0:user/release-keys
Caused by: java.lang.VerifyError: com/google/vrtoolkit/cardboard/CardboardDeviceParams
at com.google.vrtoolkit.cardboard.HeadMountedDisplayManager.createCardboardDeviceParams(HeadMountedDisplayManager.java:214)
at com.google.vrtoolkit.cardboard.HeadMountedDisplayManager.<init>(HeadMountedDisplayManager.java:54)
at com.google.vrtoolkit.cardboard.CardboardView.init(CardboardView.java:768)
at com.google.vrtoolkit.cardboard.CardboardView.<init>(CardboardView.java:263)
at com.google.vrtoolkit.cardboard.plugins.unity.UnityCardboardActivity.onCreate(UnityCardboardActivity.java:184)
at android.app.Activity.performCreate(Activity.java:5135)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2182)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2268)
at android.app.ActivityThread.access$600(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1263)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5162)
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:756)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:572)
at miui.dexspy.DexspyInstaller.main(DexspyInstaller.java:171)
at dalvik.system.NativeStart.main(Native Method)
You need to add libprotobuf-java-2.3-nano.jar. Its in the
\cardboard-java-master\CardboardSample\libs with cardboard.jar
Fixed it for me.

java.lang.NoClassDefFoundError org.eclipse.jetty.server.Connector on Jetty

I have a java web app that uses Jetty embedded and when I try to run in a linux environment I have the following exception:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Connector
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at br.com.teste.install.Launcher.work(Launcher.java:23)
at br.com.teste.install.Install.main(Install.java:14)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.Connector
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 4 more
When I run exactly the same app in a windows environment this works without any error.
I have no ideia for what happen this.
Thanks for any help.

NoClassDefFoundError in google play ActionBarSherlock

I am using ActionBarSherlock in my project. When I open my project in emulator, it works
perfectly. However, when I upload the apk file on google play it gives me the following
error
java.lang.NoClassDefFoundError: com.actionbarsherlock.R$styleable
at com.actionbarsherlock.view.MenuInflater$MenuState.readItem(MenuInflater.java:343)
at com.actionbarsherlock.view.MenuInflater.parseMenu(MenuInflater.java:162)
at com.actionbarsherlock.view.MenuInflater.inflate(MenuInflater.java:112)
at com.parkMe.ParkMyCarActivity.onCreateOptionsMenu(ParkMyCarActivity.java:180)
at com.actionbarsherlock.app.SherlockActivity.onCreatePanelMenu(SherlockActivity.java:184)
at com.actionbarsherlock.ActionBarSherlock.callbackCreateOptionsMenu(ActionBarSherlock.java:559)
at com.actionbarsherlock.internal.ActionBarSherlockNative.dispatchCreateOptionsMenu(ActionBarSherlockNative.java:60)
at com.actionbarsherlock.app.SherlockActivity.onCreateOptionsMenu(SherlockActivity.java:149)
at android.app.Activity.onCreatePanelMenu(Activity.java:2559)
at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:443)
at com.android.internal.policy.impl.PhoneWindow.invalidatePanelMenu(PhoneWindow.java:813)
at com.android.internal.policy.impl.PhoneWindow$1.run(PhoneWindow.java:3128)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
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:1008)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)
at dalvik.system.NativeStart.main(Native Method)
I am trying to get an answer for 4 days. Please help!
Thanks
Cem Kacmaz

Resources