languobeibei
张小贝_
2018-06-27 08:21

Program type already present问题应该怎么解决

5
  • chrome

根据网上的搜索信息改成了27.1.1,但问题还没有解决,请问该怎么做?

apply plugin: 'com.android.application'
buildscript {
    repositories {
        mavenCentral()
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'
    }

    allprojects {
         repositories {
            jcenter()
        }
    }
}
dependencies {
    implementation fileTree(include: '*.jar', dir: 'libs')
//    implementation project(':appcompat_v7')
//    implementation project(':recyclerview')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation project(':recyclerview')
    debugCompile 'me.ele:uetool:1.0.15'
    releaseCompile 'me.ele:uetool-no-op:1.0.15'
    // if you want to show more attrs about Fresco's DraweeView
    debugCompile 'me.ele:uetool-fresco:1.0.15'
//
//    configurations {
//        all*.exclude group: 'com.android.support', module: 'support-v13'
//    }
}

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.2 '
    useLibrary 'org.apache.http.legacy'
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
    aaptOptions.cruncherEnabled = false
    aaptOptions.useNewCruncher = false

    lintOptions {
        abortOnError false
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),        'proguard-rules.pro'
        }
    }
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'

            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
            jniLibs.srcDirs = ['jniLibs'];
        }
        androidTest .setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
}

repositories {
    google()
} 
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答