Skip to content

Rake failed when I added my resources such as styles.xml #30

@Zerowxm

Description

@Zerowxm

error log:

./resources/values/styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'.

./resources/values/styles.xml:8: error: Error: No resource found that matches the given name: attr 'colorAccent'.

./resources/values/styles.xml:6: error: Error: No resource found that matches the given name: attr 'colorPrimary'.

in my styles.xml:

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/primary</item>
        <item name="colorPrimaryDark">@color/primary_dark</item>
        <item name="colorAccent">@color/accent</item>
        <item name="android:textColorPrimary">@color/primary_text</item>
        <item name="android:textColorSecondary">@color/secondary_text</item>
        <item name="android:divider">@color/divider</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowActionBarOverlay">true</item>
        <item name="windowNoTitle">true</item>
    </style>

I've use motion-gradle to add the support lib
here is my rakefile:

# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/android'
require 'rubygems'
require 'motion-gradle'
begin
  require 'bundler'
  Bundler.require
rescue LoadError
end

Motion::Project::App.setup do |app|
  # Use `rake config' to see complete project settings.
  app.name = 'Ruby'
  app.api_version='21'
  app.theme="@styles/AppTheme"
  app.gradle do
    repository 'https://bintray.com/bintray/jcenter'
    repository 'http://dl.bintray.com/austintaylor/gradle'
    repository 'com.android.support:appcompat-v7:23.1.1'
    repository 'com.android.support:design:23.1.1'
    repository 'pl.droidsonroids.gif:android-gif-drawable:1.1.10'
    repository 'com.android.support:cardview-v7:23.1.1'
    repository 'com.jakewharton:butterknife:7.0.1'
    repository 'com.squareup.picasso:picasso:2.5.2'
    repository 'com.gordonwong:material-sheet-fab:1.2'
    repository 'com.android.support:support-v4:23.1.1'
    repository 'com.bigkoo:pickerview:2.0.3'
    repository 'com.google.code.gson:gson:2.5'
    repository 'com.mcxiaoke.volley:library:1.0.19'
    repository 'com.squareup.okhttp3:okhttp:3.1.2'
    repository 'de.hdodenhof:circleimageview:1.3.0'
  end

end

and the directory is here:
---resources
---values
---styles.xml

and if I delete my styles.xml,you know the other layout file will go out more error,and I want use the AppCompatActivity but it does not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions