更新时间:2023-01-25 15:14:08
似乎是Android Studio 3.1.1的错误。它的Android Profiler会注入一些ProGuard无法正确处理的其他代码。
手动构建APK或执行gradle命令不受影响。
It seems like a bug of Android Studio 3.1.1. It's Android Profiler injects some additional code that is not well-handled by ProGuard. Building APKs or executing gradle commands manually is not affected.
选项1:(首选) 禁用高级分析。
选项2:在调试版本中禁用收缩
Option 2: Disable shrinking for Debug builds
选项3:在从Android Studio部署应用程序时包括okhttp库。 [可能仅用于调试功能] (如果进行测量,ProGuard会删除任何未使用的方法,不会有太大开销,可能会很有用)
Option 3: Include okhttp library while deploying app from Android Studio. [probably only for debug flavor] (may be useful if measuring something, ProGuard will remove any unused methods, will be no big overhead)
如果上述解决方案/快速修复不起作用,请确保您未使用okhttp。也许您是-并且配置不正确。您可以使用 gradle app:dependencies
检查okhttp是否在您的项目或任何链接的库中被引用。
If solutions/quickfixes above don't work, please make sure you are not using okhttp. Maybe you are - and it's not properly configured. You may use gradle app:dependencies
to check if okhttp is referenced in your project or any linked libraries.
错误:Android Studio中的任务“:app:transformClassesWithDexForDebug"的执行失败
Android Studio TransformException:错误:任务':app:transformClassesWithDexForDebug'的执行失败
错误:任务 ':app:transformClassesWithMultidexlistForDebug' android studio 执行失败
错误:任务':app:transformClassesWithMultidexlistForDebug'android studio的执行失败
任务 ':app:compileDebugJavaWithJavac' Android Studio 3.1 更新执行失败