gpt4 book ai didi

android - 找不到 Gradle 构建错误样式属性

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

我试图通过检查 GitHub 中的 git 将我的项目回滚到以前的版本,但我认为我做错了。刚刚把本地项目去掉,在android studio上查看了一下git地址。但是,gradle 无法构建并显示此消息:

我导航到表示未找到样式属性的行,然后选择查找用法,但它表示此项目中没有用法。我也试过删除 twitter 工具包并重新加载它,并加载一个旧版本,两者仍然有这个问题。如何解决这个问题? gradle build wrong

该项目从一开始就使用 android studio 3.0 canary 构建。这是应用程序 gradle 文件:

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "..."
minSdkVersion 19
targetSdkVersion 26
versionCode 3
versionName "beta1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})

testCompile 'junit:junit:4.12'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:26.0.0'
compile 'com.android.support:recyclerview-v7:26.0.0'
compile 'com.twitter.sdk.android:twitter:3.1.0'
compile 'com.jakewharton:butterknife:8.7.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.8.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
annotationProcessor 'com.github.bumptech.glide:glide:3.7.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
implementation 'com.android.support:appcompat-v7:26.0.0'
implementation 'com.android.support:design:26.0.0'
}

还有另一个构建文件:

buildscript {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha9'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

最佳答案

这是主题和样式的问题。可能您的某个图书馆期望该样式可用,但没有找到。看这里Cant set Android Actionbar Background correctly作为有关如何填写可能对您有用的特定属性的指南。

根据此处的谷歌差异 https://android.googlesource.com/platform/tools/base/+/f5215ae4712f468568b58c20baadd14b769c10c4%5E!/,该资源似乎是在 2013 年引入的

更改 themes.xml 然后从 list 中使用它,或者更改 styles.xml 如果操作不当可能会导致这些副作用。

关于android - 找不到 Gradle 构建错误样式属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45579933/

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