'what is android:theme=\"@*android…''

2019-09-22 05:19发布

问题:

<activity android:theme="@*android:style/Theme.Translucent.NoTitleBar" 
       android:label="@string/app_name"
       android:name="com.facebook.FacebookActivity"
       android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize" /> 

Error in android:theme="@*android:style/Theme.Translucent.NoTitleBar" could not be resolved.

it is from the manifest

回答1:

Change it to android:theme="@android:style/Theme.Translucent.NoTitleBar". You have added * after @ syb

Replace

android:theme="@*android:style/Theme.Translucent.NoTitleBar" 

with

android:theme="@android:style/Theme.Translucent.NoTitleBar" 


回答2:

Did you try to remove the asterisk (*) between @ and android:style/Theme.Translucent.NoTitleBar ?

Should simply be: android: theme="@android:style/Theme.Translucent.NoTitleBar"



回答3:

Add theme to you activity in manifest,

<activity android:name=".activityName"
 android:theme="@android:style/Theme.Translucent"/>

or

<activity android:name=".activityName"
android:theme="@android:style/Theme.Translucent.NoTitleBar"/>