Android-Studio从3.0.1升级到3.1.0 Debug / Run app失败

时间:2018-03-28 08:08:01

标签: android android-studio android-studio-3.1

昨天我将Android-Studio从3.0.1升级到3.1.0,发现单击Debug / Run app时出现问题。

gradle版本从3.0.1升级到3.1.0 buildToolsVersion版本升级到27.0.3

Gradle sync已成功。

每次单击Debug应用程序时,如图1所示,安装APK时会出现Error:图2

Clicking Debug app

Error status

    //Error information
    03/28 15:40:41: Launching app
    The APK file/Users/hanson/myWork/android/nuttracker/app/build/outputs/apk/debug/app-debug.apk does not exist on disk.
    Error while Installing APK


    //project root build.gradle file:
    buildscript {
    repositories {
        mavenCentral()
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
            google()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.0'
            classpath 'com.google.gms:google-services:3.0.0'
        }
    }
    allprojects {
        tasks.withType(JavaCompile) {
            options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
        }
        repositories {
            mavenCentral()
            jcenter()
            maven {
                url 'https://maven.google.com/'
                name 'Google'
            }
            google()
        }
    }
    //app module dependencies library's version
    ext {
        compileSdkVersion = 26
        buildToolsVersion = "27.0.3"
        minSdkVersion = 18
        targetSdkVersion = 26

        // App dependencies
        gmsVersion = '11.8.0'
        supportLibraryVersion = '27.0.2'
        retrofitVersion = '2.3.0'
    }

1 个答案:

答案 0 :(得分:0)

感谢@Santanu Sur,我卸载了旧的Android-Studio应用程序。问题解决了。