gpt4 book ai didi

android - 将 Android studio 更新到 3.1.2 后,我得到 "Failed to load AppCompat ActionBar with unknown error. "

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:20:56 25 4
gpt4 key购买 nike

我试着在 stackoverflow 上寻找其他类似的问题,他们建议我们更改“buildToolsVersion”的版本,但我在我的 gradle 文件中没有看到这样的词。

我的 Gradle 文件(项目):-

buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'


// 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
}

我的 build.gradle (Module:app): 这是我的第二个 gradle 文件

     apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.dhruv.testhello"
minSdkVersion 15
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 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
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'
}

最佳答案

我遇到了同样的问题。我搜索了这么多,终于发现 appcompat-v7:28.0.0-alpha3 有一些 Android Studio 的“设计 View ”部分的错误。

所以我建议将 com.android.support:appcompat-v7:28.0.0-alpha3 更改为 com.android.support:appcompat-v7:28.0.0-alpha1 version 然后点击 File -> Invalidate Caches/Restart。 Volla 一切正常。

当然,您应该可以访问互联网才能下载 com.android.support:appcompat-v7:28.0.0-alpha1

关于android - 将 Android studio 更新到 3.1.2 后,我得到 "Failed to load AppCompat ActionBar with unknown error. ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50736578/

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