java – Android 3.3.0更新,错误:原因:无效的类型代码:68
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了java – Android 3.3.0更新,错误:原因:无效的类型代码:68,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2284字,纯文字阅读大概需要4分钟。
内容图文
Android Studio(3.3.0)的新更新后,我从Gradle同步中收到错误“ERROR:Cause:invalid type code:68”.即使在项目中,也是在更新之前创建的并且根本没有更改.
我试图重新安装Android Studio,但它没有帮助,所以必须有一些与我的项目不兼容的东西,但它没有说明什么和为什么.
应用程序gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
defaultConfig {
applicationId "cz.cubeit.cubeit"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
}
项目gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.11'
ext.anko_version='0.10.7'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
解决方法:
我有同样的问题.我正在两台PC上开展一个项目:一个在我办公室,一个在家里.在我的办公室,在AS 3.3更新后,一切都很好,但在家里,在我办公室执行的相同步骤后,错误代码68出来了.
几个小时后,我想出了如何解决它.
Android Studio 3.3默认启用“仅同步活动变体”选项.禁用此功能可解决此问题.但重新激活该功能时,即使成功完成Gradle同步,也会出现相同的错误.所以我认为这不是一个完整的解决方案,但至少现在我可以工作了.
内容总结
以上是互联网集市为您收集整理的java – Android 3.3.0更新,错误:原因:无效的类型代码:68全部内容,希望文章能够帮你解决java – Android 3.3.0更新,错误:原因:无效的类型代码:68所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。