簡體   English   中英

java.lang.RuntimeException: 存根僅在 proguard 啟用時為 true

[英]java.lang.RuntimeException: stub only when proguard enabled true

我已經編寫了一個示例應用程序,其中我從本地主機獲取數據......一年前創建了這個應用程序,最后我上周使用或最多兩周前使用,並且應用程序做得很好,一切都符合我的期望

更新

Resolved this issue by disabling proguard, but I want to enable like, I've enabled earlier

突然,應用程序停止從 localhost 獲取數據,看不到更多內容,但這是我在 Log 中發現的內容:

2020-06-23 15:25:51.666 3751-3751/? W/RefBase: CallStack::getCurrentInternal not linked, returning null
2020-06-23 15:25:51.666 3751-3751/? W/RefBase: CallStack::logStackInternal not linked
2020-06-23 15:25:51.687 27221-27221/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1631 android.content.ContextWrapper.startService:683 android.content.ContextWrapper.startService:683 com.sec.android.diagmonagent.sa.receiver.CFLogReceiver.sendCFLog:21 com.sec.android.diagmonagent.sa.receiver.CFLogReceiver.onReceive:13 
2020-06-23 15:25:51.705 19718-19718/com.example.myapp W/System.err: java.lang.RuntimeException: stub
2020-06-23 15:25:51.705 19718-19718/com.example.myapp W/System.err:     at c.e.b.a.<init>(:36)
2020-06-23 15:25:51.705 19718-19718/com.example.myapp W/System.err:     at com.example.myapp.UserInfoActivity$e.<init>(:362)
2020-06-23 15:25:51.705 19718-19718/com.example.myapp W/System.err:     at com.example.myapp.UserInfoActivity.onCreate(:49)
2020-06-23 15:25:51.705 19718-19718/com.example.myapp W/System.err:     at android.app.Activity.performCreate(Activity.java:7955)
2020-06-23 15:25:51.705 19718-19718/com.example.myapp W/System.err:     at android.app.Activity.performCreate(Activity.java:7944)
2020-06-23 15:25:51.705 19718-19718/com.example.myapp W/System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
2020-06-23 15:25:51.705 19718-19718/com.example.myapp W/System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3423)
2020-06-23 15:25:51.706 19718-19718/com.example.myapp W/System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
2020-06-23 15:25:51.706 19718-19718/com.example.myapp W/System.err:     at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
2020-06-23 15:25:51.706 19718-19718/com.example.myapp W/System.err:     at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
2020-06-23 15:25:51.706 19718-19718/com.example.myapp W/System.err:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
2020-06-23 15:25:51.706 19718-19718/com.example.myapp W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2147)
2020-06-23 15:25:51.706 19718-19718/com.example.myapp W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:107)
2020-06-23 15:25:51.706 19718-19718/com.example.myapp W/System.err:     at android.os.Looper.loop(Looper.java:237)
2020-06-23 15:25:51.706 19718-19718/com.example.myapp W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:7807)
2020-06-23 15:25:51.706 19718-19718/com.example.myapp W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
2020-06-23 15:25:51.706 19718-19718/com.example.myapp W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
2020-06-23 15:25:51.706 19718-19718/com.example.myapp W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1047)

所以基本上,你的類和字段在混淆過程中被重命名,因此導致了這個錯誤。 解決此問題的最簡單方法是在專業防護規則文件中添加您不希望混淆的 class 的完整 class 名稱。 請參閱: ProGuard - 混淆 apk 導致錯誤

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM