张小贝_ 2018-06-27 08:21 采纳率: 0%
浏览 18085
已结题

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

根据网上的搜索信息改成了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条回答

  • threenewbee 2018-06-27 15:34
    关注
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'
    }
    

    这个版本和你用的一致么?

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器