Android 오류: Caused by: java.lang.AssertionError: Missing field in 패키지 이름.i0.질문

12695 단어 Android
오늘 copy 항목이 하나 생겼는데, 이상하게도 debug 실행에 문제가 없지만, 내보낸 APK 실행 과정에 플래시가 발생했습니다
오보
 java.lang.RuntimeException: An error occurred while executing doInBackground()
Caused by: java.lang.AssertionError: Missing field in com.fsck.k9.i0.n
두 번째 오류에서 답을 찾았는데 이 오류를 보고하는 블로그가 매우 적다는 것을 발견했다. 마지막으로 두 편의 Stackoverflow의 질문을 참고하면 프로그래밍 설정 문제, 나의proguard-rules이다.프로 파일은 기본적으로 생성된 것으로 모두 주석이고 한 문장도 없다. 혼동과 관련된 문제를 겪지 않고 울었다. 마지막으로 원래 프로젝트의 프로골드-rules에 따랐다.프로 파일을 설정해서 문제를 성공적으로 해결했습니다.
참조:
https://stackoverflow.com/questions/20651575/android-release-apk-crash-with-java-lang-assertionerror-impossible-in-java-lang
https://stackoverflow.com/questions/15543607/assertionerror-in-gson-enumtypeadapter-when-using-proguard-obfuscation/30167048#30167048
https://blog.csdn.net/langhong8/article/details/79497076
 
구체적인 오답은 다음과 같다.
2020-04-19 16:50:59.962 20592-22018/? E/VasQuickUpdateEngine_Native: [2020-04-19 16:50:59][1587286259962][error   ][LTMainThread:22018][litetx.MGR:450]: OnFileComingNFC: SID[104024391942159], bThumb[0], fileName[mailbox-release.apk], ip[21735616], port[8082], GroupInfo:{ID=0, Size=0, Index=0, Flag=0, BatchID=0}
2020-04-19 16:51:00.132 20592-22018/? E/VasQuickUpdateEngine_Native: [2020-04-19 16:51:00][1587286260132][error   ][LTMainThread:22018][litetx.MGR:1224]: RecvFile: SID[104024391942159], srcPath[/storage/emulated/0/Android/data/com.tencent.mobileqq/Tencent/QQfile_recv/mailbox-release(3).apk], thumbPath[], GroupInfo:{ID=0, Size=1, Index=0, Flag=1, BatchID=1587286254}
2020-04-19 16:51:00.183 20592-22018/? E/VasQuickUpdateEngine_Native: [2020-04-19 16:51:00][1587286260183][error   ][LTMainThread:22018][litetx.NFC_Recv:48]: uSessionID[104024391942159], uTaskID[4889098996023311], bThumb[0] NFC_Recv Run sPath=/storage/emulated/0/Android/data/com.tencent.mobileqq/Tencent/QQfile_recv/mailbox-release(3).apk,mailbox-release.apk
2020-04-19 16:51:27.239 1375-1375/? E/HwBastetService: name: com.fsck.MailBox
2020-04-19 16:51:27.239 1375-1375/? E/HwBastetService: len: 1, name: com.fsck.MailBox, uid: 10383
2020-04-19 16:51:27.252 1375-1473/? E/AwareLog: RMS.AwareIntelligentRecg: delete pkg:com.fsck.MailBox userid:0 from iAware.db
2020-04-19 16:51:28.454 2306-2445/? E/HwNaturalBase: [Binder:2306_4]: clearDataByOwner ignore: Found null values with the given ownerPkgName is[com.fsck.MailBox].
2020-04-19 16:51:28.863 2007-14232/? E/DollieAdapterService: notifyActivityState pkg:com.fsck.MailBox/com.fsck.k9.activity.MessageList state:2 fg:true mUid:10383
2020-04-19 16:51:28.957 2007-14232/? E/DollieAdapterService: notifyActivityState pkg:com.fsck.MailBox/com.fsck.k9.ui.onboarding.OnboardingActivity state:2 fg:true mUid:10383
2020-04-19 16:51:29.279 1375-1463/? E/WindowManager: win=Window{9738c09 u0 Splash Screen com.fsck.MailBox EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true
2020-04-19 16:51:29.283 1375-1463/? E/WindowManager: win=Window{92607b9 u0 Splash Screen com.fsck.MailBox EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true
2020-04-19 16:51:29.372 2229-2580/? E/HSC_SEC_BG: AppChangeReceiver:handlePackageReplace DbPermissionItem is null for com.fsck.MailBox
2020-04-19 16:51:30.103 2007-14232/? E/DollieAdapterService: notifyActivityState pkg:com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupBasics state:2 fg:true mUid:10383
2020-04-19 16:51:30.499 669-1499/? E/BufferQueueProducer: [com.fsck.MailBox/com.fsck.k9.ui.onboarding.OnboardingActivity#0]:1338: disconnect: not connected (req=1)
2020-04-19 16:51:33.608 2007-14232/? E/DollieAdapterService: notifyActivityState pkg:com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupBasics state:2 fg:true mUid:10383
2020-04-19 16:51:34.300 2007-14232/? E/DollieAdapterService: notifyActivityState pkg:com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupAccountType state:2 fg:true mUid:10383
2020-04-19 16:51:34.683 669-1499/? E/BufferQueueProducer: [com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupBasics#0]:1338: disconnect: not connected (req=1)
2020-04-19 16:51:35.419 2007-14232/? E/DollieAdapterService: notifyActivityState pkg:com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupIncoming state:2 fg:true mUid:10383
2020-04-19 16:51:35.800 669-743/? E/BufferQueueProducer: [com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupAccountType#0]:1338: disconnect: not connected (req=1)
2020-04-19 16:51:35.806 1375-1745/? E/InputDispatcher: Window handle Window{9602b29 u0 com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupAccountType} has no registered input channel
2020-04-19 16:51:36.580 2007-14232/? E/DollieAdapterService: notifyActivityState pkg:com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupCheckSettings state:2 fg:true mUid:10383
2020-04-19 16:51:36.594 7789-8016/? E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
    Process: com.fsck.MailBox, PID: 7789
    java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$4.done(AsyncTask.java:399)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
        at java.util.concurrent.FutureTask.run(FutureTask.java:271)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:929)
     Caused by: java.lang.AssertionError: Missing field in com.fsck.k9.i0.n
        at e.g.a.q$l.(Unknown Source:109)
        at e.g.a.q$c.a(Unknown Source:189)
        at e.g.a.p.a(Unknown Source:94)
        at e.g.a.e$a.a(Unknown Source:41)
        at e.g.a.e$a.a(Unknown Source:135)
        at e.g.a.p.a(Unknown Source:94)
        at e.g.a.p.a(Unknown Source:2)
        at com.fsck.k9.e0.q.(Unknown Source:74)
        at com.fsck.k9.e0.q.(Unknown Source:2)
        at com.fsck.k9.e0.q.a(Unknown Source:0)
        at com.fsck.k9.j0.c0.(Unknown Source:29)
        at com.fsck.k9.j0.c0.a(Unknown Source:2)
        at com.fsck.k9.j0.d0.a(Unknown Source:53)
        at com.fsck.k9.j0.v.a(Unknown Source:13)
        at com.fsck.k9.b0.c.a(Unknown Source:11)
        at com.fsck.k9.a0.b.c(Unknown Source:52)
        at com.fsck.k9.a0.b.a(Unknown Source:33)
        at com.fsck.k9.e0.g.t(Unknown Source:2)
        at com.fsck.k9.e0.g.b(Unknown Source:0)
        at com.fsck.k9.activity.setup.AccountSetupCheckSettings$d.b(Unknown Source:53)
        at com.fsck.k9.activity.setup.AccountSetupCheckSettings$d.a(Unknown Source:19)
        at com.fsck.k9.activity.setup.AccountSetupCheckSettings$d.a(Unknown Source:19)
        at com.fsck.k9.activity.setup.AccountSetupCheckSettings$d.doInBackground(Unknown Source:2)
        at android.os.AsyncTask$3.call(AsyncTask.java:378)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289) 
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:929) 
     Caused by: java.lang.NoSuchFieldException: DELETED
        at java.lang.Class.getField(Class.java:1604)
        at e.g.a.q$l.(Unknown Source:41)
        at e.g.a.q$c.a(Unknown Source:189) 
        at e.g.a.p.a(Unknown Source:94) 
        at e.g.a.e$a.a(Unknown Source:41) 
        at e.g.a.e$a.a(Unknown Source:135) 
        at e.g.a.p.a(Unknown Source:94) 
        at e.g.a.p.a(Unknown Source:2) 
        at com.fsck.k9.e0.q.(Unknown Source:74) 
        at com.fsck.k9.e0.q.(Unknown Source:2) 
        at com.fsck.k9.e0.q.a(Unknown Source:0) 
        at com.fsck.k9.j0.c0.(Unknown Source:29) 
        at com.fsck.k9.j0.c0.a(Unknown Source:2) 
        at com.fsck.k9.j0.d0.a(Unknown Source:53) 
        at com.fsck.k9.j0.v.a(Unknown Source:13) 
        at com.fsck.k9.b0.c.a(Unknown Source:11) 
        at com.fsck.k9.a0.b.c(Unknown Source:52) 
        at com.fsck.k9.a0.b.a(Unknown Source:33) 
        at com.fsck.k9.e0.g.t(Unknown Source:2) 
        at com.fsck.k9.e0.g.b(Unknown Source:0) 
        at com.fsck.k9.activity.setup.AccountSetupCheckSettings$d.b(Unknown Source:53) 
        at com.fsck.k9.activity.setup.AccountSetupCheckSettings$d.a(Unknown Source:19) 
        at com.fsck.k9.activity.setup.AccountSetupCheckSettings$d.a(Unknown Source:19) 
        at com.fsck.k9.activity.setup.AccountSetupCheckSettings$d.doInBackground(Unknown Source:2) 
        at android.os.AsyncTask$3.call(AsyncTask.java:378) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289) 
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:929) 
2020-04-19 16:51:36.664 1375-1657/? E/InputDispatcher: channel '95f2db9 com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupIncoming (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-04-19 16:51:36.664 1375-1657/? E/InputDispatcher: channel '95f6a09 com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupCheckSettings (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-04-19 16:51:36.685 1375-15863/? E/WindowManager: win=Window{95f6a09 u0 com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupCheckSettings EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true
2020-04-19 16:51:36.689 1375-15863/? E/WindowManager: win=Window{95f2db9 u0 com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupIncoming EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true
2020-04-19 16:51:36.713 2007-14232/? E/DollieAdapterService: notifyActivityState pkg:com.fsck.MailBox/com.fsck.k9.activity.setup.AccountSetupCheckSettings state:20 fg:false mUid:10383
2020-04-19 16:51:50.760 3264-7624/? E/ChromeSync: [Sync,SyncIntentOperation] Error handling the intent: Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.fsck.MailBox flg=0x4000010 cmp=com.google.android.gms/.chimera.GmsIntentOperationService (has extras) }.
2020-04-19 16:52:13.540 3264-7624/? E/ChromeSync: [Sync,SyncIntentOperation] Error handling the intent: Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.fsck.MailBox flg=0x4000010 cmp=com.google.android.gms/.chimera.GmsIntentOperationService (has extras) }.

나의proguard-rules.프로 파일
# Add project specific ProGuard rules here.

-dontobfuscate

# Preserve the line number information for debugging stack traces.
-keepattributes SourceFile,LineNumberTable

# Library specific rules
-dontnote android.net.http.*
-dontnote org.apache.commons.codec.**
-dontnote org.apache.http.**
-dontnote com.squareup.moshi.**
-dontnote com.github.amlcurran.showcaseview.**
-dontnote de.cketti.safecontentresolver.**
-dontnote com.tokenautocomplete.**

-dontwarn okio.**
-dontwarn com.squareup.moshi.**

# Project specific rules
-dontnote com.fsck.k9.ui.messageview.**
-dontnote com.fsck.k9.view.**

-keep public class org.openintents.openpgp.**

-keepclassmembers class * extends androidx.appcompat.widget.SearchView {
    public (android.content.Context);
}

# okhttp rules
# see: https://github.com/square/okhttp/blob/master/okhttp/src/main/resources/META-INF/proguard/okhttp3.pro

# JSR 305 annotations are for embedding nullability information.
-dontwarn javax.annotation.**

# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase

# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*

# OkHttp platform used only on JVM and when Conscrypt dependency is available.
-dontwarn okhttp3.internal.platform.ConscryptPlatform

좋은 웹페이지 즐겨찾기