根据壁画文件http://frescolib.org/docs/multiple-apks.html,我向gradle构建中添加了以下代码:
android {
...
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a'
universalApk false
}
}
...
}
但是在构建android项目时出现错误:
Error:Task with name 'packageRelease' not found in project ':app'.
我想念什么吗?我刚刚找到了原因,我使用一个库来分析名为bugly的崩溃,因此将流代码添加到gradle配置中:
// project gradle.build
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.tencent.bugly:symtabfileuploader:1.3.9'
}
// app gradle.build
apply plugin: 'bugly'
bugly {
appId = 'xxxxxx'
appKey = 'xxxxx'
}
dependencies {
...
compile 'com.tencent.bugly:crashreport:1.2.9'
}
它会导致
task not found
,但是我仍然不知道如何解决它。
最佳答案
如果您查看https://github.com/BuglyDevTeam/Bugly-Android,他们会解释如何设置ABI过滤器,并且您必须指定android.useDeprecatedNdk=true
。不知道旧的NDK是否可以用于ABI拆分,但是您可以查看它是否有效。
如果不起作用,则可以尝试使用其option 2手动包含预编译的库,该库应与ABI拆分兼容。
您还可以在其GitHub页面上提出有关此问题的问题。
关于android - 在Gradle上运送多个APK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38805773/