久しぶりの質問で恐縮です。
現在macOSでAndroidStudio(3.1.4)を使用して、ToDoListApp(TODOリストのアプリ)を作成しようとしています。
その過程で、これまでのコードを確認するために実行ボタンを押したのですが、エラーが2つ出てきました。
1)error: failed linking references.
2)error: resource style/Widget.Design.CoordinatorLayout (aka com.example.名前.todolistapplication:style/Widget.Design.CoordinatorLayout) not found.
Message{kind=ERROR, text=error: resource style/Widget.Design.CoordinatorLayout (aka com.example.名前todolistapplication:style/Widget.Design.CoordinatorLayout) not found., sources=[/Users/名前/AndroidStudioProjects/TodoListApplication/app/src/main/res/values/styles.xml:17:5-91], original message=, tool name=Optional.of(AAPT)}
これまで、試したのは、compileと入力する方法はバージョンによっては古く、現在(v3.1.4)ではimplementationと入力するのが正しいそうですが、それを変えても変化がありませんでした。
build.gradle(Module: app)↓
apply
1apply plugin: 'realm-android' 2 3android { 4 compileSdkVersion 28 5 defaultConfig { 6 applicationId "com.example.kazuhisanoguchi.todolistapplication" 7 minSdkVersion 15 8 targetSdkVersion 28 9 versionCode 1 10 versionName "1.0" 11 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 } 13 buildTypes { 14 release { 15 minifyEnabled false 16 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 } 18 } 19} 20 21dependencies { 22 implementation fileTree(dir: 'libs', include: ['*.jar']) 23 implementation 'com.android.support:appcompat-v7:28.0.0-rc02' 24 implementation 'com.android.support.constraint:constraint-layout:1.1.3' 25 implementation 'com.android.support:design:28.0.0-rc02' 26 testImplementation 'junit:junit:4.12' 27 androidTestImplementation 'com.android.support.test:runner:1.0.2' 28 androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 29 implementation 'io.realm:android-adapters:1.0.1' 30 31} 32
ここより下が、style.xmlのコードです。
<!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="coordinatorLayoutStyle">@style/Widget.Design.CoordinatorLayout</item> </style> <style name="AppTheme.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style> <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /> </resources>
この中に間違いらしきものがあると思うのですが、見当つきません。
どなたか同じ問題に遭遇、または解決された経験のある方、ご教授願います。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/09/22 08:07