gpt4 book ai didi

android - 未捕获的翻译错误 : com. android.dx.cf.code.SimException: local 0007: invalid

转载 作者:太空狗 更新时间:2023-10-29 15:33:11 25 4
gpt4 key购买 nike

我不使用 Proguard。项目构建成功,但当我尝试在设备上运行时,它显示此错误。我当时在 Android Studio 3.0 中使用 Kotlin 项目工作,那真是糟糕的经历。我决定切换回 2.3 AS,但问题仍然存在。日志变小了,但异常文本是一样的。

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

tasks.withType(JavaCompile) {
options.fork = true
options.incremental = true
}

android {
def rootProject = rootProject.ext

compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
versionCode rootProject.versionCode
versionName rootProject.versionName
testInstrumentationRunner rootProject.testInstrumentationRunner
vectorDrawables.useSupportLibrary = true
// multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
//flavorDimensions "content"
production {
// dimension "content"
}
staging {
//dimension "content"
}
}

// Remove productionDebug and stagingRelease as it's not needed.
android.variantFilter { variant ->
if (variant.buildType.name == 'release'
&& variant.getFlavors().get(0).name == 'staging') {
variant.setIgnore(true)
} else if (variant.buildType.name == 'debug' && variant.getFlavors().get(0).name == 'production') {
variant.setIgnore(true)
}
}

packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
// Required for annotation processing plugins like Dagger
kapt {
generateStubs = true
}


dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile 'com.android.support:appcompat-v7:26.0.0-beta2'
compile 'com.android.support:design:26.0.0-beta2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'

//firebase
compile "com.google.firebase:firebase-auth:$firebaseVersion"
compile "com.google.firebase:firebase-database:$firebaseVersion"
compile "com.google.firebase:firebase-core:$firebaseVersion"
compile "com.google.firebase:firebase-storage:$firebaseVersion"

//rx
compile "io.reactivex.rxjava2:rxjava:$rxVersion"
compile "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"

//mvp
compile "com.hannesdorfmann.mosby3:mvp:$mosbyVersion"
compile 'com.hannesdorfmann.mosby3:mvp-conductor:3.0.0'

//dagger
compile "com.google.dagger:dagger:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"

//image loader
compile 'com.github.bumptech.glide:glide:4.0.0-RC1'
kapt 'com.github.bumptech.glide:compiler:4.0.0-RC1'

//to work with dates
compile 'net.danlew:android.joda:2.9.9'

//bottom-bar
compile 'com.aurelhubert:ahbottomnavigation:2.0.6'
compile 'com.bluelinelabs:conductor:2.1.4'

//leak canary
debugCompile "com.squareup.leakcanary:leakcanary-android:$leakcanaryVersion"
releaseCompile "com.squareup.leakcanary:leakcanary-android-no-op:$leakcanaryVersion"
// testcompile "com.squareup.leakcanary:leakcanary-android-no-op:$leakcanaryVersion"
}

apply plugin: 'com.google.gms.google-services'

最佳答案

类似issue在谷歌问题跟踪器中。

尝试在 Android Studio 中禁用 Instant Run

要禁用即时运行:

  1. 打开“设置”或“首选项”对话框。

  2. 导航到“构建、执行、部署”>“即时运行”。

  3. 取消选中“启用即时运行”旁边的框。

关于android - 未捕获的翻译错误 : com. android.dx.cf.code.SimException: local 0007: invalid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45025120/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com