android - Android:生成主 dex 列表时出错
问题描述
在为 paypal 添加另一个包后,我收到了这个错误,但我已经删除了这个错误,我仍然收到同样的错误,我已经检查了这个问题的几个解决方案,但还没有解决。gradle 代码已附在下面。
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
com.android.build.api.transform.TransformException:生成主 dex 列表时出错。
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "mainproject.mainroject.story"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
aaptOptions
{
cruncherEnabled = false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
//noinspection GradleCompatible
implementation 'com.google.firebase:firebase-config:11.0.4'
implementation 'com.google.firebase:firebase-database:11.0.4'
implementation 'com.google.firebase:firebase-auth:11.0.4'
implementation 'com.google.firebase:firebase-storage:11.0.4'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.google.firebase:firebase-messaging:11.0.4'
implementation 'com.firebaseui:firebase-ui:3.2.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.github.barteksc:android-pdf-viewer:3.0.0-beta.5'
implementation 'com.paypal.sdk:paypal-android-sdk:2.16.0'
implementation 'com.craftman.cardform:cardform:0.0.2'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
解决方案
我通过将 minsdkversion 增加到 21 解决了这个问题。希望这会对某人有所帮助
推荐阅读
- pytorch - 无法更改 Faster RCNN 中的锚点
- google-cloud-platform - BigQuery Table 每天多个分区
- javascript - 地理位置真的很慢我做错了什么?
- c# - 如何将特定行放在 datagridview 中?
- python-3.x - 将指定的行拆分为多个文件
- python - 将浮点日期转换为 YYYY-MM-DD 格式
- python - 如何在后台运行无限循环?
- pandas - 为什么dataframe.drop_duplicates('name') 正确,dataframe.drop_duplicates('age') 不行?
- django - 在特定参数下创建新对象
- android - 修改使用热敏打印机打印的阿拉伯字母