我有一个包含很多可绘制对象的项目,这些可绘制对象的名称以“a”或“b”开头(例如a1_back、a2_back、b1_start、b2_start等等)。这些可绘制对象未在代码中使用,但由以下代码使用:Stringname=image.getName();//getName()returnsforexamle"a1_back"res=getResources().getIdentifier(name,"drawable",getPackageName());因此,我在代码中的任何地方都没有使用特定的字符串“a1_back”。这就是为什么当我设置“shrinkResourcestrue”
当我尝试缩小我的功能APK大小时,我在我的功能构建Gradle中使用shrinkResourcestrue。但是它提示Error:Resourceshrinkercannotbeusedforlibraries.这篇文章要求我们使用它https://medium.com/jet-stories/make-your-app-instant-33855ab5d02b是我做错了什么还是InstantApps真的不支持? 最佳答案 据我从这篇文章中了解到(我只是快速阅读了它,仍在我的阅读列表中),shrinkResourcestru
我在将我的项目迁移到最新的Gradle4.0+AndroidStudio3版本时遇到问题,这给了我各种各样的错误。渐渐地,我设法将它们全部整理出来,除了这个。Couldnotresolvealldependenciesforconfiguration':app:forGoogleCoverageRuntimeClasspath'.>Unabletofindamatchingconfigurationinproject:mylibrary:-Configuration'debugApiElements':-Requiredcom.android.build.gradle.internal