Je vois un journal d’information dans ma console qui ressemble à une erreur. Il est imprimé à partir d’art, généralement associé à la mémoire, mais j’ai besoin d’aide pour comprendre ce que cela signifie. La classe en question est ma classe MapFragment. MapFragment est une classe personnalisée que j'ai créée et qui étend SupportMapFragment afin que je puisse remplacer les événements tactiles. Cette classe est-elle à l'origine de ce problème et comment puis-je résoudre le problème?
Voici ma classe MapFragment
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);
}
L'erreur que je reçois est,
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)
Je voudrais essayer un clean et reset-cache.
Fichier -> Invalider le cache et redémarrer
J'ai eu la même erreur et crash. J'ai essayé Invalidate Cache puis redémarrer, et j'ai également essayé d'effacer les données de mon application sur l'émulateur. La solution pour résoudre ce problème était essuyant le système d'exploitation de l'émulateur entier}, puis l'erreur et le crash ont disparu. Ce n'était jamais un problème sur un appareil réel.