gpt4 book ai didi

android - styles.xml 中未解析的几个 android 属性

转载 作者:行者123 更新时间:2023-11-29 23:25:29 25 4
gpt4 key购买 nike

下面我的 styles.xml 中以“android:”开头的每个属性都给我一个“无法解析符号”错误。这种情况已经有一段时间了,所以我不确定它是从哪里开始的,是什么原因造成的。删除“android:”会在构建日志中显示“资源链接失败”错误。

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>

<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
</style>

<style name="TheoTheme" parent="AppTheme">
<item name="colorAccent">@color/Accent</item>
<item name="android:colorBackground">@color/lightBackground</item>
</style>

<style name="TheoTheme.ActionBarReverse" parent="TheoTheme">
<item name="android:textColorPrimary">@color/text_color_primary</item>
</style>

<style name="PurpleTheme" parent="TheoTheme">
<item name="colorAccent">@color/Accent2</item>
</style>

<style name="ChatRoomTheme" parent="TheoTheme">
<item name="colorAccent">@color/Accent</item>
</style>

<style name="LoginTheme" parent="TheoTheme" >
<item name="android:colorBackground">@color/colorPrimary</item>
</style>

<style name="RegisterTheme" parent="TheoTheme">
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="FirebaseUI.AuthMethodPicker.Logo">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="gravity">center</item>

</style>

<style name="GenericProgressBackground" parent="android:Theme">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:background">@color/colorPrimaryDark</item>
<item name="android:gravity">center</item>
</style>
<style name="GenericProgressIndicator" parent="@android:style/Widget.ProgressBar">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:indeterminate">true</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

<style name="DMTheme.AppTheme" parent="ChatRoomTheme" />

build.gradle 文件:

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {
signingConfigs {
ReleaseKey {
file('X:\\Documents\\All\\Creative\\Programming\\Projects\\KeyStore\\TheoKeyStore.jks')

}
}
compileSdkVersion 28
defaultConfig {
applicationId "app.meettheo.theo"
minSdkVersion 19
targetSdkVersion 28
versionCode 5
versionName "0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.ReleaseKey
}
debug {
signingConfig signingConfigs.ReleaseKey
}
}
lintOptions {
checkReleaseBuilds false
}
}



dependencies {
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 fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v13:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'android.arch.paging:runtime:1.0.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'org.jetbrains:annotations:16.0.2'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.gms:play-services-ads:17.0.0'
implementation 'com.google.android.gms:play-services-places:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.facebook.android:facebook-android-sdk:4.38.1'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.firebaseui:firebase-ui-auth:4.2.0'
implementation 'com.google.firebase:firebase-firestore:17.1.3'
implementation 'com.firebaseui:firebase-ui-firestore:4.1.0'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-ads:17.0.0'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.6@aar') {
transitive = true
}
}


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

无效/清理/重建不起作用。我打破了什么让这发生?

最佳答案

我认为您可以尝试以下解决方案:

  • 备份项目
  • 删除.idea文件夹和.i​​ml文件
  • 重新启动 Android Studio 并重新导入项目。

对于某些人来说,只需从 .idea 文件夹中删除所有库并重新同步 Gradle 即可。

如果这些都不起作用,您总是可以重新安装完整的工作室,这取决于您的网络速度,不会花费那么长时间。

关于android - styles.xml 中未解析的几个 android 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53660829/

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