今日から、Android Studio は style.xml 内の AppCompat テーマを見つけることができませんが、たとえばコード内の AppCompatActivity は認識されます。私の Android Studio バージョンは 2.2.2、ビルド #AI-145.3360264 です。
最新のビルド ツールへのアップグレード、SDK (25) バージョンのコンパイルなどを試しましたが、問題は解決しませんでした。
現時点では、以下をインストールしました (SDK マネージャーから):
- Android API: 19 と 23
- SDK プラットフォーム ツール: 25.0.1
- SDK ツール: 25.2.3
- ビルドツール: 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'
}
ベストアンサー1
Android Studio 3.1.2 でうまくいった別の解決策:
build.gradle
これらがある場合は削除してください:
'com.android.support:appcompat-v7:27.1.1' 'com.android.support:design:27.1.1'
次に同期し、削除を取り消して、再度同期します。