java.lang.NoClassDefFoundError: android/app/AppOpsManager
- Dominant language
- C++
- Stars
- 7k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
我在使用AndFix过程中,程序在mPatchManager.loadPatch();的过程中会报java.lang.NoClassDefFoundError: android/app/AppOpsManager的错误。 我的apk是用ant编译出来的动态加载包
10-30 18:05:44.650 11121-11167/? D/AndFix﹕ dalvik_setFieldFlag: 9 10-30 18:05:44.650 11121-11167/? D/AndFix﹕ modify cn.ninegame.gamemanager.biz.util.OpenUserGuideUtil_CF.type flag: 10-30 18:05:44.650 11121-11167/? D/AndFix﹕ dalvik_setFieldFlag: 9 10-30 18:05:44.660 11121-11167/? W/dalvikvm﹕ Unable to match class for part: 'Landroid/app/AppOpsManager;Ljava/lang/String;IILjava/lang/String;)Ljava/lang/Integer;' 10-30 18:05:44.660 11121-11167/? I/TestRunner﹕ failed: testSkipToOnlineGamePage(cn.ninegame.gamemanager.test.base.testcase.index.FirstIndexTestCase) 10-30 18:05:44.660 11121-11167/? I/TestRunner﹕ ----- begin exception ----- 10-30 18:05:44.660 11121-11167/? I/TestRunner﹕ java.lang.NoClassDefFoundError: android/app/AppOpsManager at java.lang.Class.getDeclaredMethods(Native Method) at java.lang.Class.getDeclaredMethods(Class.java:703) at com.alipay.euler.andfix.AndFixManager.fixClass(AndFixManager.java:194) at com.alipay.euler.andfix.AndFixManager.fix(AndFixManager.java:179) at com.alipay.euler.andfix.patch.PatchManager.loadPatch(PatchManager.java:211) at cn.ninegame.gamemanager.test.common.testcase.NineGameAutoTestCase.newSetDefConfig(NineGameAutoTestCase.java:109) at cn.ninegame.gamemanager.test.common.testcase.NineGameAutoTestCase.setUp(NineGameAutoTestCase.java:85) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:545) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1551) Caused by: java.lang.ClassNotFoundException: android.app.AppOpsManager at com.alipay.euler.andfix.AndFixManager$1.findClass(AndFixManager.java:165) at java.lang.ClassLoader.loadClass(ClassLoader.java:501) at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with AndFixManager.java at lines 165 and 194, then follow the mPatchManager.loadPatch() call into PatchManager.java at line 211. Reproduce the NoClassDefFoundError with the ant-built APK and determine whether patch loading can complete on the affected Android environment without this exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100