###前提・実現したいこと
初めて質問させていただきます、よろしくお願い致します。
R.javaでエラーが出てアプリが実行できません。
アクションバーを非表示にしようとしてManifestをいじっていて、
一度実機でレイアウトを確認しようとしたところ、R.javaのエラーが出るようになってしまいました。
エラー内容としては
Resource id cannot be an empty string (at 'theme' with value '@style/').
と表示されます。
サイトを見て私が試したことは、
- activityのTheme自体を消してみる。
- Themeに上位のapplicationで指定されている、android:theme="@style/AppTheme"を書いてみる。
- BuildからClean Projectをしてみる。
です。上2つの場合 android:theme="@style/"の表示に変更されます(元に戻る)。
CleanProjectは実機をコンパイルした時と同じエラーメッセージが表示されました。(下記 2.です)
エラーに関係がありそうな部分を下記に書きます。
よろしくお願いいたします。
###発生している問題・エラーメッセージ
- Manifest.xml(抜粋)
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:debuggable = "true"
<activity
android:name="アクティビティ名"
android:label="@string/app_name"
android:theme="@style/" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
- コンパイル・CleanProject時のエラーメッセージ
パス名/AndroidManifest.xml
Error:(20, 28) Resource id cannot be an empty string (at 'theme' with value '@style/').
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/finewerk00/Android/Sdk/build-tools/21.1.2/aapt'' finished with non-zero exit value 1
- styles.xml
</resources><!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> </style>
###補足情報
最小API:14
ターゲットAPI:22
ツール:AndroidStudio1.1.0
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。