2015-10-06 45 views
0

我的Android新手,請大家幫忙,沒有資源發現匹配的Android清單給定的名稱文件

Error:(36, 28) No resource found that matches the given name (at 'theme' with value '@style/FullscreenTheme').

錯誤:

Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command ' C:\Users\jrdev_r1m3g5m\AppData\Local\Android\Sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="org.blwsocietyuk.com.blwsocietyuk" 
    android:versionCode="1" 
    android:versionName="1.0" > 

    <uses-sdk 
     android:minSdkVersion="16" 
     android:targetSdkVersion="23" /> 

    <!-- To auto-complete the email text field in the login form with the user's emails --> 
    <uses-permission android:name="android.permission.GET_ACCOUNTS" /> 
    <uses-permission android:name="android.permission.READ_PROFILE" /> 
    <uses-permission android:name="android.permission.READ_CONTACTS" /> 

    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme" > 
     <activity 
      android:name="org.blwsocietyuk.com.blwsocietyuk.MainActivity" 
      android:label="@string/app_name" 
      android:theme="@style/AppTheme.NoActionBar" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.DEFAULT" /> 
      </intent-filter> 
     </activity> 
     <activity 
      android:name="org.blwsocietyuk.com.blwsocietyuk.SplashScreen" 
      android:configChanges="orientation|keyboardHidden|screenSize" 
      android:label="@string/title_activity_splash_screen" 
      android:theme="@style/FullscreenTheme" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <activity 
      android:name="org.blwsocietyuk.com.blwsocietyuk.TrendingPosts" 
      android:label="@string/title_activity_trending_posts" 
      android:theme="@style/AppTheme.NoActionBar" > 
     </activity> 
     <activity android:name="org.blwsocietyuk.com.blwsocietyuk.Webview" > 
     </activity> 
    </application> 

</manifest> 

所以我加入了我的風格在這裏

<resources> 

    <!-- Base application theme. --> 
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 
     <!-- Customize your theme here. --> 
     <item name="colorPrimary">@color/myPrimaryColor</item> 
     <item name="colorPrimaryDark">@color/myPrimaryDarkColor</item> 
     <item name="colorAccent">@color/myAccentColor</item> 
     <item name="android:textColorPrimary">@color/myTextPrimaryColor</item> 
     <item name="drawerArrowStyle">@style/DrawerArrowStyle</item> 
     <item name="windowActionModeOverlay">true</item> 
     <item name="android:textColor">@color/black</item> 
     <item name="android:windowBackground">@color/myWindowBackground</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" /> 

    <!--<style name="AppThemeBar" parent="AppTheme">--> 
    <!--</style>--> 

    <style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle"> 
     <item name="spinBars">true</item> 
     <item name="color">@android:color/white</item> 
    </style> 

    <style name="ToolBarStyle" parent=""> 
     <item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item> 
     <item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item> 
    </style> 

    <style name="CardActionButton"> 
     <item name="android:textSize">16sp</item> 
     <item name="android:textColor">@drawable/card_button</item> 
     <item name="android:ellipsize">end</item> 
     <item name="android:gravity">start|center</item> 
     <item name="android:paddingLeft">16.0dip</item> 
     <item name="android:paddingRight">4dp</item> 
     <item name="android:maxLines">2</item> 
     <item name="android:drawablePadding">4.0dip</item> 
    </style> 

    <style name="listTitle"> 
     <item name="android:layout_width">wrap_content</item> 
     <item name="android:layout_height">wrap_content</item> 
     <item name="android:lineSpacingExtra">1dp</item> 
     <item name="android:paddingLeft">5dp</item> 
     <item name="android:paddingTop">2dp</item> 
     <item name="android:maxLines">2</item> 
     <item name="android:ellipsize">end</item> 
     <item name="android:textColor">@color/dark_gray</item> 
     <item name="android:fontFamily">sans-serif-light</item> 
     <item name="android:textAppearance">?android:attr/textAppearanceMedium</item> 
    </style> 

    <style name="listStyle"> 
     <item name="android:clipToPadding">false</item> 
     <item name="android:paddingTop">@dimen/activity_vertical_margin</item> 
     <item name="android:paddingBottom">@dimen/activity_vertical_margin</item> 
     <item name="android:paddingLeft">@dimen/activity_horizontal_margin</item> 
     <item name="android:paddingRight">@dimen/activity_horizontal_margin</item> 
    </style> 

    <style name="listStyleNoHighlight"> 
     <item name="android:clipToPadding">false</item> 
     <item name="android:paddingBottom">@dimen/activity_vertical_margin</item> 
    </style> 


</resources> 
+0

難道你創建了一個名爲「FullscreenTheme」的樣式?向我們展示您的styles.xml。 –

+0

你有沒有在樣式中聲明這樣的主題@ style/FullscreenTheme'? – Aayushi

+0

複製粘貼你的style.xml在drawable/values文件夾下...或者你可以刪除android:theme =「@ style/AppTheme.NoActionBar」使它工作 –

回答

4

您必須瞭解樣式將Android的 按照以下鏈接工作,以獲得相同的 http://developer.android.com/guide/topics/ui/themes.html

的想法,您已經定義的android:主題=「@風格/ FullscreenTheme」,這是不存在的RES /價值/ styles.xml

+0

你在哪裏看到style.xml? –

+0

res/values/styles.xml –

相關問題