加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

在styles.xml(Android Studio)中无法解析符号“主题”

发布时间:2020-12-16 07:52:50 所属栏目:百科 来源:网络整理
导读:从今天起,Android Studio在styles.xml中找不到AppCompat主题,例如代码中的AppCompatActivity可以被识别.我的Android Studio版本是2.2.2,Build#AI-145.3360264 我已经尝试升级到最新的构建工具,编译sdk(25)版本等,但它没有解决问题. 目前我已经安装了以下(从s

从今天起,Android Studio在styles.xml中找不到AppCompat主题,例如代码中的AppCompatActivity可以被识别.我的Android Studio版本是2.2.2,Build#AI-145.3360264

我已经尝试升级到最新的构建工具,编译sdk(25)版本等,但它没有解决问题.

目前我已经安装了以下(从sdk经理):

> android api:19和23
> sdk平台工具:25.0.1
> sdk工具:25.2.3
> build-tools:23.0.2和25.0.1
>支持仓库:40
> Google存储库:39

还有其他几个,这些都不是必须的.

build.gradle的应用程序:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '25.0.1'
    defaultConfig {
        applicationId "xxx.xxxxxxxx.xxxxxxxxx" //not the real applicationId
        minSdkVersion 14
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
        }
        debug {

        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'],dir: 'libs')
    compile files('libs/RootTools.jar')
    compile 'com.android.support:support-v4:23.+'
    compile 'com.android.support:support-v13:23.+'
    compile 'com.android.support:appcompat-v7:23.+'
    compile 'com.android.support:design:23.+'
    compile 'com.android.support:cardview-v7:23.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
    compile 'de.hdodenhof:circleimageview:2.1.0'
}
当我升级到alpha-2时,我遇到了同样的问题.

我看了这个链接:http://tools.android.com/recent,但唯一有效的是:

改变这个:
Classpath’com.android.tools.build:gradle:2.3.0-alpha2′

为了这:
Classpath’com.android.tools.build:gradle:2.2.3′

在你的build.gradle(项目)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读