Android Studio 3.5中缺少即时运行 [英] Instant run is missing in Android Studio 3.5
问题描述
我想禁用即时运行,但是菜单点不存在.我知道即时运行应该在哪里,但是它完全丢失了.我不知道为什么我刚刚升级到Android Studio 3.5,但是使用AsyncTask时出现错误,并且我知道在禁用即时运行时可以解决该问题,但是我做不到.
请参阅屏幕截图以更好地理解
这是我的gradle(应用程序)
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "com.project.myapp"
minSdkVersion 21
targetSdkVersion 29
versionCode 13
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
resValue "string", "google_maps_api_key", GoogleMapDebug
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/asset/'] } }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.gms:play-services-location:12.0.1'
implementation 'com.google.android.gms:play-services-maps:12.0.1'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
他们删除了即时运行,将其替换为应用更改".参见发布博客文章有关更改的更多信息.并且文档具有有关应用更改"性质的更多信息.>
I want to disable instant run but the menu point is not there. I know where the instant run should be, but it is completely missing. I don't know why. I just upgraded to Android Studio 3.5 but I get an error when using AsyncTask and I know that the problem can be solved when disabling instant run, but I can't.
See the screenshot for better understanding
This is my gradle (app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "com.project.myapp"
minSdkVersion 21
targetSdkVersion 29
versionCode 13
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
resValue "string", "google_maps_api_key", GoogleMapDebug
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/asset/'] } }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.gms:play-services-location:12.0.1'
implementation 'com.google.android.gms:play-services-maps:12.0.1'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
They removed Instant Run, replacing it with "Apply Changes". See the release blog post for more about the change. And the docs have more information about the nature of "Apply Changes".
这篇关于Android Studio 3.5中缺少即时运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!