Material Design出現You need to use a Theme.AppCompat theme (or descendant) with this activity
You need to use a Theme.AppCompat theme (or descendant) with this activity問題
因為你雖然在Activtiy裡寫上了extends AppCompatActivity
但卻在AndroidManifest.xml裡的主題還是預設的主題.AppTheme或者其他不相符合的主題。這就有就掛羊頭賣狗肉的問題。
所以我們只要在該activity裡面的或者application(會對該應用裡面的activity都起作用)裡面的主題改為
android:theme=”@style/Theme.AppCompat”就可以完美的解決你的問題。
順便提一個這個問題
This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
根據提示,你可以很快知道是你定義的activity裡面定義了一個類似actionbar的導航條,而預設也應用也擁有actionbar,造成兩者的衝突。
這樣你可以在主題中修改成以下,就可以完美解決你的問題
android:theme=”@style/Theme.Xxx.NoActionBar”
相關推薦
Material Design出現You need to use a Theme.AppCompat theme (or descendant) with this activity
You need to use a Theme.AppCompat theme (or descendant) with this activity問題 因為你雖然在Activtiy裡寫上了extends AppCompatActivity 但卻在Andro
按照官網寫的第一個APP,出現了You need to use a Theme.AppCompat theme (or descendant) with this activity問題
這是我第一次根據Android官網指導寫的APP,連結如下: 每一步都嚴格參照了官網指導,一步一步敲程式碼、執行,結果報瞭如下錯誤: 10-08 18:08:40.878 18503 18503 E AndroidRuntime: Caused by: java.la
彈出AlertDialog的時候報You need to use a Theme.AppCompat theme (or descendant) with this activity錯誤
今天遇到一個bug,用百度地圖的時候,我對上面的標註設定了點選監聽,設定的相應的反應是彈出一個AlertDialog 記錄一解決bug的歷程 但是Dialog卻沒有彈出來,一看AS下面,報了這錯,起初我看我gradle.app裡面 implementation 'com.android.suppo
對話方塊報錯 You need to use a Theme.AppCompat theme (or descendant) with this activity.
在跟著視訊學習安卓開發時候發現程式碼一致,結果我的卻報錯。 原因:我是用的開發環境為Androidstudio,視訊中使用的是eclipse。在Androidstudio中activity預設繼承的AppCompatActivity,只需要在Androidmanifest檔案中配
IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity
錯誤描述為: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 起因: 我想在Manifest中設定我的activity
java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this a
在設定隱藏標題欄的時候:出現以下錯誤 java.lang.IllegalStateException: You need to use a Theme. AppCompat theme (or des
You need to use a Theme.AppCompat theme (or descendant) with this activity解決方法
當我的MainActivity繼承自v7包中的ActionBarActivity或者AppCompatActivity時,如果在style.xml檔案中指定MainActivity所使用的樣式如下: <style name="AppTheme" parent="and
Android問題集錦之二十八:You need to use a Theme.AppCompat theme (or descendant) with this activity.
錯誤描述為:java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.起因:我想在Manifest中設定我的activ
我的Android進階之旅------>解決錯誤:You need to use a Theme.AppCompat theme (or descendant) with this activity.
#1、錯誤描述 今天,想實現Activity不顯示標題欄的效果,在專案的AndroidManifest.xml檔案,對相應的Activity新增屬性 android:theme="@android:style/Theme.NoTitleBar" 具體程式
亂七八糟問題-java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(class
spring boot Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(clas
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
join with python ast 環境 測試 href from local 環境是win10 python3.5 安裝beautifulsoup後,運行測試報錯 from bs4 import BeautifulSoup soup = Beautiful
[error:沒有解析庫]Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?
error ted requested install lib you features builder all 將代碼拷貝到服務器上運行,發生錯誤提示需要新安裝parser library. 查看代碼中發現有以下內容: soup = BeautifulSoup(open(
Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
res requested tro fin IT html str 成功 color python3.6.3 我在處理爬蟲時候使用BeautifulSoup中遇到報錯 “ bs4.FeatureNotFound: Couldn‘t find a tree builde
cdde::block Debug ERROR: You need to specify a debugger program in the debuggers's settings.
有的小夥伴有可能在使用code::blocks程式設計的時候,在除錯是出現下面的問題 這種情況是因為沒有指定除錯程式,或者是指定的是錯誤的,或者就沒有下載除錯程式,沒有下載的,下載一個mingw下載gdb程式就行。 在確定安裝了gdb後,在code::blocks的偵錯程式選項,選擇
Swiss style web design: Everything you need to know
Swiss style web design: Everything you need to knowSwiss Style rejects decoration, pursues objectivity and favors clear communication. How can we apply thi
5 Strategies You Need To Run A Very Successful Podcast, With Winnie Sun
I had the pleasure of interviewing Winnie Sun, who is one of the most followed financial advisors on social media today! She is also a Forbes Contributor,
1Z0-051 25. You need to create a table with the following column specifications:
25. You need tocreate a table with the following column specifications: 1. Employee ID(numeric data type) for each employee 2. Employee N
Server-side activities have been updated. You need to restart SharePoint Designer to use the updated version of activities
補丁 download ted designer .com round cache help serve 一,環境: SharePoint Online Win10 + SharePoint Designer 2013 錯誤描述: 使用SPD3013打開SPO
更新資料庫中資料時出現: Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe m
在資料庫中更新資料時報錯: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle