kotlin gradle 3.0.0-alpha5中的android应用程序未安装错误
实际上,在我当时使用2.3 gradle之前,没有错误,现在我改为3.0.0-alphs-5应用程序未安装错误。如果你能解决这个错误,我将不胜感激。是kotlin错误还是其他原因?我找不到解决方案,请帮助我(这只发生在我通过studio进行调试而不是共享时)尝试以下方法kotlin gradle 3.0.0-alpha5中的android应用程序未安装错误,android,Android,实际上,在我当时使用2.3 gradle之前,没有错误,现在我改为3.0.0-alphs-5应用程序未安装错误。如果你能解决这个错误,我将不胜感激。是kotlin错误还是其他原因?我找不到解决方案,请帮助我(这只发生在我通过studio进行调试而不是共享时)尝试以下方法 apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "//"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
and project level
buildscript {
ext.kotlin_version = '1.1.2-4'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
然后去
./gradlew --stop
试试下面的方法
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "//"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
and project level
buildscript {
ext.kotlin_version = '1.1.2-4'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
然后去
./gradlew --stop
如果您的MainActivity重复,请检查您的清单。如果您的MainActivity重复,请检查您的清单。对不起!没有帮助对不起!没有帮助一切都很好一切都很好