0

我有一個AppCompatActivity,並且現在我想運行我的代碼。我在活動開始得到這個錯誤:無法解析@ style/Theme.AppCompat.Light.NoActionBar

您需要如果我使用Theme.AppCompat,因爲它建議我使用Theme.AppCompat主題(或後代)與本次活動

,但後來我得到這個:

無法解析@風格/ Theme.AppCompat.Light.NoActionBar

無論在AndroidManifest.xml,也不能在樣式文件中使用它。

我使用這些依賴關係:

compile fileTree(include: ['*.jar'], dir: 'libs') 
compile 'com.android.support:design:25.3.1' 
compile 'com.google.firebase:firebase-database:10.2.0' 
compile 'com.android.support:cardview-v7:25.3.1' 
compile 'com.parse:parse-android:1.15.8' 
compile 'com.google.firebase:firebase-auth:10.2.0' 
compile 'com.facebook.android:facebook-android-sdk:[4,5)' 
compile "com.android.support:support-core-utils:25.4.0" 
compile 'com.android.support:appcompat-v7:25.4.0' 
compile 'com.android.support:support-v4:25.4.0' 
+0

你可以發佈你的style.xml文件 – MaxExplode

回答

0

清潔&重建項目!

0

你已經在你的依賴混合支持Android庫版本。確保所有com.android.support:*具有相同的版本號。