首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >已存在的程序类型: android.support.v4.R

已存在的程序类型: android.support.v4.R
EN

Stack Overflow用户
提问于 2018-05-27 06:13:48
回答 1查看 687关注 0票数 1

我正在尝试生成一个签名的apk,并且我得到了错误:

已存在的程序类型: android.support.v4.R

我已经尝试将support-v4从某些依赖项中排除在外。但这没什么用。我一直在寻找答案,但没有人解决不了我的问题。但该应用程序在调试模式下运行良好。

非常感谢你在这个问题上的时间和协助。

这是我的gradle应用程序文件:

代码语言:javascript
复制
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'

分级项目文件

代码语言:javascript
复制
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
}
EN

回答 1

Stack Overflow用户

发布于 2018-05-27 13:16:00

您需要从这个依赖性中排除支持appcompat-v7。

代码语言:javascript
复制
implementation 'com.dnkilic.waveform:waveform:0.9.3'

在这方面:

代码语言:javascript
复制
implementation ('com.dnkilic.waveform:waveform:0.9.3') {
     exclude group: 'com.android.support'
     exclude module: 'appcompat-v7'
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50549530

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档