无法在com.android.tools.build:gradle版本高于2.0.0的物理设备上运行/部署应用程序

时间:2016-07-23 15:52:10

标签: java android gradle

当我将com.android.tools.build:gradle更新为高于2.0.0的版本时,我遇到了部署应用程序的问题。

当我将其更改为2.1.2时,项目已编译并由gradle构建,但之后没有任何反应,就像它被忽略一样。

我正在尝试使用LG Swift L5 Optimus

Android 4.0.3上运行该应用

这是项目的build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

这里是build.gradle的app:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "keddit.com.keddit"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:design:23.3.0'
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile group: 'io.reactivex', name: 'rxjava', version: '1.1.5'
    compile group: 'io.reactivex', name: 'rxandroid', version: '1.2.0'
    compile "com.squareup.retrofit2:retrofit:2.0.2"
    compile "com.squareup.retrofit2:converter-moshi:2.0.2"
    compile group: 'joda-time', name: 'joda-time', version: '2.9.3'

    testCompile "org.mockito:mockito-core:1.+"
    testCompile 'org.mockito:mockito-core:1.+'
    testCompile ('org.jetbrains.spek:spek:1.0.25') {
        exclude group: 'org.jetbrains.kotlin'
    }
}
buildscript {
    ext.kotlin_version = '1.0.3'
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
repositories {
    maven {
        url "http://repository.jetbrains.com/all"
    }
    mavenCentral()
}

0 个答案:

没有答案