Androidreact-nativechangingupgradingcom.android.tools.build:gradleresultsininvalidAPKs
创始人
2024-10-09 17:31:47
0

当你upgrade你的android build tools 时,你的APK可能出就现了问题,所以你要确保你使用的所有依赖项都与最新的build tools兼容。

例如,如果你更新了Gradle的版本(com.android.tools.build:gradle),你需要更新你的app/build.gradle文件中的android plugin版本。

以下是一个例子:

旧版:

buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.1.2' } }

新版:

buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' } }

如果你遇到了类似于以下错误:

Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

你可能需要添加以下内容到你的app/build.gradle:

android { ... defaultConfig { ... multiDexEnabled true } ... }

最后,运行以下命令清除gradle缓存:

./gradlew clean

然后重新构建你的项目:

./gradlew assembleDebug

如果还有问题,你可以考虑禁用Instant Run:

android { ... defaultConfig { ... // add this line to disable instant run minSdkVersion 20 } ... }

最后再次运行构建命令:

./gradlew assembleDebug

相关内容

热门资讯

透视脚本!newpoker脚本... 透视脚本!newpoker脚本(透视)果然存在有辅助软件(真的有挂)-哔哩哔哩运newpoker脚本...
今天下午!wpk真的有透视嘛(... 今天下午!wpk真的有透视嘛(透视)确实真的是有辅助修改器(有挂透明挂)-哔哩哔哩1、wpk真的有透...
在玩家背景下!wepoker辅... 在玩家背景下!wepoker辅助器激活码(透视)好像是有辅助平台(竟然有挂)-哔哩哔哩暗藏猫腻,小编...
于此同时!wepokerplu... 于此同时!wepokerplus万能挂(透视)好像是有辅助工具(详细教程)-哔哩哔哩小薇(辅助器软件...
事发当天!wepoker透视脚... 事发当天!wepoker透视脚本视频(透视)果然有辅助安装(有挂助手)-哔哩哔哩1、该软件可以轻松地...
透视实锤!wpk模拟器是什么(... 透视实锤!wpk模拟器是什么(透视)都是存在有辅助软件(真是有挂)-哔哩哔哩一、wpk模拟器是什么可...
长期以来!约局吧开挂(透视)其... 长期以来!约局吧开挂(透视)其实是有辅助下载(有挂教程)-哔哩哔哩约局吧开挂辅助器是一种具有地方特色...
透视玄学!拱趴大菠萝开挂方法(... 透视玄学!拱趴大菠萝开挂方法(透视)总是是有辅助安装(果真有挂)-哔哩哔哩1、用户打开应用后不用登录...
记者获悉!newpoker脚本... 记者获悉!newpoker脚本(透视)竟然真的是有辅助下载(发现有挂)-哔哩哔哩1、实时newpok...
透视苹果版!wepoker透视... 透视苹果版!wepoker透视脚本下载(透视)原来有辅助插件(讲解有挂)-哔哩哔哩1)wepoker...