Rejecting re-init on previously-failed class java.lang.Class<nt>: java.lang.NoClassDefFoundError

I see an information log in my console that looks like an error. It is printed from "art", which is generally associated to memory but I need help understanding what it means. The class in question is my MapFragment class. The MapFragment is a custom class I created that extends SupportMapFragment so that I can override touch events. Is this class causing this issue, and how can I resolve?

Here is my MapFragment class

public class MapFragment extends SupportMapFragment {
    private TouchableWrapper mTouchView;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View originalContentView = super.onCreateView(inflater, container, savedInstanceState);
        mTouchView = new TouchableWrapper(getActivity());
        mTouchView.addView(originalContentView);
        return mTouchView;
    }

    @Override
    public View getView() {
        return mTouchView;
    }

    /**
     * MapOnTouchListener callback
     *
     * @param listener
     */
    public void setMapTouchListener(TouchableWrapper.MapOnTouchListener listener) {
        mTouchView.setMapOnTouchListener(listener);
    }

The error I am receiving is,

Rejecting re-init on previously-failed class java.lang.Class<nt>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/chimera/Fragment;
     at java.lang.Class dalvik.system.DexFile.defineClassNative(java.lang.String, java.lang.ClassLoader, java.lang.Object, dalvik.system.DexFile) (DexFile.java:-2)
     at java.lang.Class dalvik.system.DexFile.defineClass(java.lang.String, java.lang.ClassLoader, java.lang.Object, dalvik.system.DexFile, java.util.List) (DexFile.java:299)
    at java.lang.Class dalvik.system.DexFile.loadClassBinaryName(java.lang.String, java.lang.ClassLoader, java.util.List) (DexFile.java:292)
     at java.lang.Class dalvik.system.DexPathList.findClass(java.lang.String, java.util.List) (DexPathList.java:418)
     at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:54)
     at java.lang.Class bzi.loadClass(java.lang.String, boolean) (:com.google.android.gms:28)
     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
     at com.google.maps.api.android.lib6.impl.ez com.google.maps.api.android.lib6.impl.fi.a(android.content.Context, com.google.maps.api.android.lib6.drd.as, com.google.maps.api.android.lib6.impl.fp, java.lang.String, boolean) (:com.google.android.gms.DynamiteModulesB:177)
     at com.google.maps.api.android.lib6.impl.az com.google.maps.api.android.lib6.impl.az.a(com.google.android.gms.maps.GoogleMapOptions, boolean, java.lang.String, com.google.maps.api.android.lib6.impl.e, android.app.Activity) (:com.google.android.gms.DynamiteModulesB:347)
     at com.google.maps.api.android.lib6.impl.az com.google.maps.api.android.lib6.impl.az.a(com.google.android.gms.maps.GoogleMapOptions, boolean, com.google.maps.api.android.lib6.impl.e, android.app.Activity) (:com.google.android.gms.DynamiteModulesB:320)
     at com.google.maps.api.android.lib6.impl.bq com.google.maps.api.android.lib6.impl.cp.a(com.google.android.gms.maps.GoogleMapOptions) (:com.google.android.gms.DynamiteModulesB:82)
     at un com.google.maps.api.android.lib6.impl.co.a(un, un, android.os.Bundle) (:com.google.android.gms.DynamiteModulesB:139)
     at boolean com.google.android.gms.maps.internal.w.onTransact(int, android.os.Parcel, android.os.Parcel, int) (:com.google.android.gms.DynamiteModulesB:107)
     at boolean android.os.Binder.transact(int, android.os.Parcel, android.os.Parcel, int) (Binder.java:507)
     at com.google.android.gms.dynamic.IObjectWrapper com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(com.google.android.gms.dynamic.IObjectWrapper, com.google.android.gms.dynamic.IObjectWrapper, android.os.Bundle) ((null):-1)
     at android.view.View com.google.android.gms.maps.SupportMapFragment$zza.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) ((null):-1)
     at void com.google.android.gms.dynamic.zza$4.zzb(com.google.android.gms.dynamic.LifecycleDelegate) ((null):-1)
     at void com.google.android.gms.dynamic.zza.zza(android.os.Bundle, com.google.android.gms.dynamic.zza$zza) ((null):-1)
     at android.view.View com.google.android.gms.dynamic.zza.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) ((null):-1)
     at android.view.View com.google.android.gms.maps.SupportMapFragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) ((null):-1)
     at android.view.View android.rider.flex.udi.fragments.MapFragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) (MapFragment.java:19)
     at android.view.View android.support.v4.app.Fragment.performCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) (Fragment.java:2192)
     at void android.support.v4.app.FragmentManagerImpl.moveToState(android.support.v4.app.Fragment, int, int, int, boolean) (FragmentManager.java:1255)
     at void android.support.v4.app.FragmentManagerImpl.moveToState(android.support.v4.app.Fragment) (FragmentManager.java:1472)
     at void android.support.v4.app.FragmentManagerImpl.addFragment(android.support.v4.app.Fragment, boolean) (FragmentManager.java:1691)
     at android.view.View android.support.v4.app.FragmentManagerImpl.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (FragmentManager.java:3440)
     at android.view.View android.support.v4.app.FragmentController.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (FragmentController.java:120)
     at android.view.View android.support.v4.app.FragmentActivity.dispatchFragmentsOnCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (FragmentActivity.java:378)
     at android.view.View android.support.v4.app.BaseFragmentActivityHoneycomb.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (BaseFragmentActivityHoneycomb.java:33)
     at android.view.View android.support.v4.app.FragmentActivity.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (FragmentActivity.java:79)
     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:784)
     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:734)
     at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:865)
     at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:828)
     at void android.view.LayoutInflater.parseInclude(org.xmlpull.v1.XmlPullParser, android.content.Context, android.view.View, android.util.AttributeSet) (LayoutInflater.java:1011)
     at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:861)
     at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:828)
     at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:525)
     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:427)
     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:378)
     at void android.support.v7.app.AppCompatDelegateImplV9.setContentView(int) (AppCompatDelegateImplV9.java:292)
     at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140)
     at void android.rider.flex.udi.activity.MapActivity.onCreate(android.os.Bundle) (MapActivity.java:196)
     at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6942)
     at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1126)
     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2880)
     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2988)
     at void android.app.ActivityThread.-wrap14(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1631)
     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
     at void android.os.Looper.loop() (Looper.java:154)
     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6682)
     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1520)
     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1410)  Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.chimera.Fragment" on path: DexPathList[[zip file "/data/data/com.google.android.gms/app_chimera/m/00000024/DynamiteModulesB_GmsCore_prodmnc_alldpi_release.apk"],nativeLibraryDirectories=[/data/user/0/com.google.android.gms/app_chimera/m/00000024/n/arm64-v8a, /system/lib64, /vendor/lib64]]
     at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
     at java.lang.Class bzi.loadClass(java.lang.String, boolean) (:com.google.android.gms:34)
     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
     at java.lang.Class dalvik.system.DexFile.defineClassNative(java.lang.String, java.lang.ClassLoader, java.lang.Object, dalvik.system.DexFile) (DexFile.java:-2)
     at java.lang.Class dalvik.system.DexFile.defineClass(java.lang.String, java.lang.ClassLoader, java.lang.Object, dalvik.system.DexFile, java.util.List) (DexFile.java:299)
     at java.lang.Class dalvik.system.DexFile.loadClassBinaryName(java.lang.String, java.lang.ClassLoader, java.util.List) (DexFile.java:292)
     at java.lang.Class dalvik.system.DexPathList.findClass(java.lang.String, java.util.List) (DexPathList.java:418)
     at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:54)
     at java.lang.Class bzi.loadClass(java.lang.String, boolean) (:com.google.android.gms:28)
     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
     at com.google.maps.api.android.lib6.impl.ez com.google.maps.api.android.lib6.impl.fi.a(android.content.Context, com.google.maps.api.android.lib6.drd.as, com.google.maps.api.android.lib6.impl.fp, java.lang.String, boolean) (:com.google.android.gms.DynamiteModulesB:177)
     at com.google.maps.api.android.lib6.impl.az com.google.maps.api.android.lib6.impl.az.a(com.google.android.gms.maps.GoogleMapOptions, boolean, java.lang.String, com.google.maps.api.android.lib6.impl.e, android.app.Activity) (:com.google.android.gms.DynamiteModulesB:347)
     at com.google.maps.api.android.lib6.impl.az com.google.maps.api.android.lib6.impl.az.a(com.google.android.gms.maps.GoogleMapOptions, boolean, com.google.maps.api.android.lib6.impl.e, android.app.Activity) (:com.google.android.gms.DynamiteModulesB:320)
     at com.google.maps.api.android.lib6.impl.bq com.google.maps.api.android.lib6.impl.cp.a(com.google.android.gms.maps.GoogleMapOptions) (:com.google.android.gms.DynamiteModulesB:82)
     at un com.google.maps.api.android.lib6.impl.co.a(un, un, android.os.Bundle) (:com.google.android.gms.DynamiteModulesB:139)
     at boolean com.google.android.gms.maps.internal.w.onTransact(int, android.os.Parcel, android.os.Parcel, int) (:com.google.android.gms.DynamiteModulesB:107)
     at boolean android.os.Binder.transact(int, android.os.Parcel, android.os.Parcel, int) (Binder.java:507)
     at com.google.android.gms.dynamic.IObjectWrapper com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(com.google.android.gms.dynamic.IObjectWrapper, com.google.android.gms.dynamic.IObjectWrapper, android.os.Bundle) ((null):-1)
     at android.view.View com.google.android.gms.maps.SupportMapFragment$zza.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) ((null):-1)
     at void com.google.android.gms.dynamic.zza$4.zzb(com.google.android.gms.dynamic.LifecycleDelegate) ((null):-1)
     at void com.google.android.gms.dynamic.zza.zza(android.os.Bundle, com.google.android.gms.dynamic.zza$zza) ((null):-1)
     at android.view.View com.google.android.gms.dynamic.zza.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) ((null):-1)
     at android.view.View com.google.android.gms.maps.SupportMapFragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) ((null):-1)
     at android.view.View android.rider.flex.udi.fragments.MapFragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) (MapFragment.java:19)
     at android.view.View android.support.v4.app.Fragment.performCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) (Fragment.java:2192)
     at void android.support.v4.app.FragmentManagerImpl.moveToState(android.support.v4.app.Fragment, int, int, int, boolean) (FragmentManager.java:1255)
     at void android.support.v4.app.FragmentManagerImpl.moveToState(android.support.v4.app.Fragment) (FragmentManager.java:1472)
     at void android.support.v4.app.FragmentManagerImpl.addFragment(android.support.v4.app.Fragment, boolean) (FragmentManager.java:1691)
     at android.view.View android.support.v4.app.FragmentManagerImpl.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (FragmentManager.java:3440)
     at android.view.View android.support.v4.app.FragmentController.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (FragmentController.java:120)
     at android.view.View android.support.v4.app.FragmentActivity.dispatchFragmentsOnCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (FragmentActivity.java:378)
     at android.view.View android.support.v4.app.BaseFragmentActivityHoneycomb.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (BaseFragmentActivityHoneycomb.java:33)
     at android.view.View android.support.v4.app.FragmentActivity.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (FragmentActivity.java:79)
     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:784)
     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:734)
     at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:865)
     at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:828)
     at void android.view.LayoutInflater.parseInclude(org.xmlpull.v1.XmlPullParser, android.content.Context, android.view.View, android.util.AttributeSet) (LayoutInflater.java:1011)
     at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:861)
     at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:828)
     at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:525)
     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:427)
     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:378)
     at void android.support.v7.app.AppCompatDelegateImplV9.setContentView(int) (AppCompatDelegateImplV9.java:292)
     at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140)
     at void android.rider.flex.udi.activity.MapActivity.onCreate(android.os.Bundle) (MapActivity.java:196)
     at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6942)
     at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1126)
     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2880)
     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2988)
     at void android.app.ActivityThread.-wrap14(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1631)
     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
     at void android.os.Looper.loop() (Looper.java:154)
     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6682)
     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1520)
     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1410)

java.lang.NoClassDefFoundError indicates, that something was found at compiletime but not at runtime. Maybe you just have to add it to the Classpath.

Right click on your project and select -> Compile Module, and then re-start the project and it should work again.

Rejecting re-init on previously-failed class java.lang.Class, Rejecting re-init on previously-failed class (JobServiceEngineImpl) #467. Closed JobIntentService$JobServiceEngineImpl>: java.lang. I am trying to connect to a mysql server from android studio. I have added the mysql connectors jar-file to the project and to the classpath environment variables. Everything compiles fine but at r

I would try a clean and reset-cache.

File -> Invalidate Cache and restart

Rejecting re-init on previously-failed class java.lang.Class<com , 10-03 16:36:59.428 9509-9509/ I/zygote64: Rejecting re-init on previously-failed class java.lang.Class<uJ>: java.lang.NoClassDefFoundError: Failed resolution  Rejecting re-init on previously-failed class (JobServiceEngineImpl) Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.app

I had the same error and crash. I tried Invalidate Cache and restart and also tried clearing my app data on the emulator. The key to fixing it was wiping the entire emulator's os and then the error and crash went away. It was never an issue on a real device.

Rejecting re-init on previously-failed class (JobServiceEngineImpl , Drawable 2019-04-26 13:57:46.587 27346-27346/com.yongdaimi.android.​ffapitest I/art: Rejecting re-init on previously-failed class java.lang. As of Android N, I am seeing far more Rejecting re-init on previously-failed class errors on anything that calls those optional dependencies. For example, lets say there is a method in your library that makes use of RecyclerViews. However, the person using your library does not include RecyclerViews.

Clean Project and Run app again worked for me.

Rejecting re-init on previously-failed class java.lang.Class<uJ , Hi- What I am doing is that I had a jar file for a BlueTooth Printer and using the binding library project I converted it to a dll file. Me, after struggle all night because my dependencies' version are the same. After adding Firebase Analytics, when I edited the code and run to my device my app crashed with Rejecting re-init on previously-failed class com.google.android.gms I have to clean project and run again, then it worked fine but will be crashed again if I edit the code.

Cross-check this line

View originalContentView = super.onCreateView(inflater, container, savedInstanceState);

android studio: Rejecting re-init on previously-failed class java.lang , problem. The log is as follows: 10-22 15:18:32.130 29298 29298 I art : Rejecting re-init on previously-failed class java.lang.Class<com.qiscus.sdk.chat.core. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Rejecting re-init on previously-failed class java

Unity Android with AppCompat Rejecting re-init on previously-failed , I have upgraded my Android Studio to Android Studio 3.2 Build #AI-181.5540.7.32.5014246, built on September 17, 2018 JRE: 1.8.0_152-release-1136-b06 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrai

Rejecting re-init on previously-failed class java.lang.Class<android , Unity Android with AppCompat Rejecting re-init on previously-failed class java.lang.Class Discussion in ' Android ' started by amillardo , Aug 27, 2015 . amillardo

Rejecting re-init on previously-failed class java.lang, 07-10 11:37:34.541 11093-11093/? D/SoLoader: init finish: 4 SO sources prepared init exiting 07-10 11:37:34.543 11093-11109/? D/SoLoader: About to load: libsonarfb.so libsonarfb.so not found on /da

Comments
  • did you resolved the issue?
  • I can't find Compile Module, please write your solution steps or post an image that shows the steps of the solution
  • @portfoliobuilder how did you do these steps?
  • Yeah I have the same question, cant find this option anymore.
  • @Baxtex the solution is old now. Do the following. First clean project and see if that resolves your issue. Second, in your xml where you reference the MapFragment, don't use "class". Use "name". For example, android:name="<your package>.MapFragment". MapFragment extends SupportMapFragment. These steps removed the error for me
  • I am getting similar issue while using LocationListener. Where Location code is in a .jar which is imported as a jar dependency in another project. I need help