我正在尝试生成一个签名的apk,并且我得到了错误:
已存在的程序类型: android.support.v4.R
我已经尝试将support-v4从某些依赖项中排除在外。但这没什么用。我一直在寻找答案,但没有人解决不了我的问题。但该应用程序在调试模式下运行良好。
非常感谢你在这个问题上的时间和协助。
这是我的gradle应用程序文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.android.puchotask1"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.facebook.fresco:fresco:1.9.0'
implementation 'com.facebook.android:facebook-android-sdk:4.33.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'ai.api:sdk:2.0.7'
implementation 'ai.api:libai:1.6.12'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.dnkilic.waveform:waveform:0.9.3'
}
apply plugin: 'com.google.gms.google-services'分级项目文件
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}发布于 2018-05-27 13:16:00
您需要从这个依赖性中排除支持appcompat-v7。
implementation 'com.dnkilic.waveform:waveform:0.9.3'在这方面:
implementation ('com.dnkilic.waveform:waveform:0.9.3') {
exclude group: 'com.android.support'
exclude module: 'appcompat-v7'
}https://stackoverflow.com/questions/50549530
复制相似问题