从今天起,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(项目)
原文地址:https://www.jb51.cc/xml/292796.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。