gpt4 book ai didi

android - QMOBILE、TECNO、ALPS java.lang.NoClassDefFoundError : android. support.v7.internal.view.menu.MenuBuilder

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:24:04 24 4
gpt4 key购买 nike

ScreenShot

不仅仅是三星设备。我在这三个设备上遇到相同的异常:QMOBILE、TECNO、ALPS

Fatal Exception: java.lang.NoClassDefFoundError: android.support.v7.internal.view.menu.MenuBuilder
at android.support.v7.widget.ActionMenuView.getMenu(ActionMenuView.java:643)
at android.support.v7.widget.Toolbar.ensureMenu(Toolbar.java:876)
at android.support.v7.widget.Toolbar.getMenu(Toolbar.java:847)
at android.support.v7.internal.widget.ToolbarWidgetWrapper.getMenu(ToolbarWidgetWrapper.java:696)
at android.support.v7.internal.app.ToolbarActionBar.getMenu(ToolbarActionBar.java:583)
at android.support.v7.internal.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:441)
at android.support.v7.internal.app.ToolbarActionBar$1.run(ToolbarActionBar.java:65)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5333)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(NativeStart.java)

proguard file

-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontobfuscate
-ignorewarnings
-verbose
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
-keepattributes Signature*Annotation*,EnclosingMethod,InnerClasses

#retrolambda
-dontwarn java.lang.invoke.*

# couchgram
-keep class com.couchgram.privacycall.**{ *; }
-keep class com.couchgram.privacycall.BuildConfig { *; }


# cropper
-keep class com.theartofdev.edmodo.cropper.**{ *;}

#sdk
-keepattributes *Annotation*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgent
-keep public class * extends android.preference.Preference
-keep public class * extends android.support.v4.app.Fragment
-keep public class * extends android.app.Fragment
-keep public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
-dontwarn android.support.**
-keepclassmembers class * {
@com.google.api.client.util.Key <fields>;
}
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}

-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}

-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}

-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
-dontwarn com.google.android.youtube.**
-dontwarn com.google.android.analytics.**
-dontwarn com.google.common.**

# v4 widget
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.** { *; }

# v7 widget
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }


# event bus
-keepclassmembers class ** {
public void onEvent*(**);
}
-keepclassmembers class * extends de.greenrobot.event.util.ThrowableFailureEvent {
public <init>(java.lang.Throwable);
}
-dontwarn de.greenrobot.event.util.*$Support
-dontwarn de.greenrobot.event.util.*$SupportManagerFragment

# facebook
-keep class com.facebook.** { *; }

# rxjava
-keep class rx.schedulers.Schedulers {
public static <methods>;
}
-keep class rx.schedulers.ImmediateScheduler {
public <methods>;
}
-keep class rx.schedulers.TestScheduler {
public <methods>;
}
-keep class rx.schedulers.Schedulers {
public static ** test();
}

# appcompat

-keep public class android.support.v7.widget.** { *; }
-keep public class android.support.v7.internal.widget.** { *; }
-keep public class android.support.v7.internal.view.menu.** { *; }

-keep public class * extends android.support.v4.view.ActionProvider {
public <init>(android.content.Context);
}

# retrofit
-dontwarn com.google.appengine.api.urlfetch.*
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-dontwarn com.squareup.okhttp.**
-dontwarn rx.**
-dontwarn retrofit.**
-dontwarn okio.**
-keep class retrofit.** { *; }
-keepclasseswithmembers class * {
@retrofit.http.* <methods>;
}

# okhttp
-keepattributes Signature
-keepattributes *Annotation*
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-dontwarn com.squareup.okhttp.**

# Okio
-keep class sun.misc.Unsafe { *; }
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**

# eventbus
-keepclassmembers class ** {
public void onEvent*(**);
}

-keepclassmembers class * extends de.greenrobot.event.util.ThrowableFailureEvent {
public <init>(java.lang.Throwable);
}
-dontwarn de.greenrobot.event.util.*$Support
-dontwarn de.greenrobot.event.util.*$SupportManagerFragment

# crashlytics
-keep class com.crashlytics.** { *; }


# Gson specific classes
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.stream.** { *; }

# otto
-keepclassmembers class ** {
@com.squareup.otto.Subscribe public *;
@com.squareup.otto.Produce public *;
}

# sqlite
-keep class org.sqlite.** { *; }
-keep class org.sqlite.database.** { *; }

# playservice
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}

-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}

-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}

-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}

# anootation
-dontwarn org.androidannotations.api.rest.**

#realm
-keep class com.couchgram.privacycall.db.CallStickerHistory{*;}
-keep class io.realm.** { *; }
-dontwarn javax.**
-dontwarn io.realm.**
-keep class io.realm.annotations.RealmModule
-keep @io.realm.annotations.RealmModule class *



#countly
-keep class ly.count.** { *; }
-keep class org.OpenUDID.** { *; }


#Workaround for Samsung Android 4.2 bug
#menu builder
-keepattributes **
-keep class !android.support.v7.internal.view.menu.**,** {*;}
-keep class !android.support.v7.internal.view.menu.* implements android.support.v4.internal.view.SupportMenu, android.support.v7.** {*;}
-keep class !android.support.v7.internal.view.menu.*MenuBuilder*, android.support.v7.** { *; }
-keep class !android.support.v7.internal.view.menu.**,android.support.** {*;}
-keep class !android.support.v7.internal.view.menu.MenuBuilder,!android.support.v7.internal.view.menu.SubMenuBuilder, android.support.v7.**{*;}
-repackageclasses "android.support.v7"

-dontpreverify
-dontoptimize
-dontshrink
-dontwarn **
-dontnote **

#nativeinvoke
-keepclasseswithmembernames class * {
native <methods>;
}
-keep class com.couchgram.privacycall.utils.Secure{
*;
}

#butterknife
-dontwarn butterknife.internal.**
-keep class **$$ViewInjector { *; }
-keep class **$$ViewBinder { *; }
-keepnames class * { @butterknife.InjectView *;}
-keepnames class * { @butterknife.Bind *;}
-dontwarn butterknife.Views$InjectViewProcessor
-dontwarn com.gc.materialdesign.views.**
-keep class butterknife.** { *; }

-keepclasseswithmembernames class * {
@butterknife.* <fields>;
}

-keepclasseswithmembernames class * {
@butterknife.* <methods>;
}


#jodatime
-dontwarn org.joda.convert.**

最佳答案

编译'com.android.support:appcompat-v7:24.0.0-alpha1'

包括上述内容,即 build.gradle 中最新版本的支持库根据 google groups 的最新更新修复了此问题

https://code.google.com/p/android/issues/detail?id=78377

关于android - QMOBILE、TECNO、ALPS java.lang.NoClassDefFoundError : android. support.v7.internal.view.menu.MenuBuilder,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33706164/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com