I might be wrong, but I think the problem is that *android-sdk-plugin* 
expects the resources to be in src/main/res, not bin/resources/res.
You’ll probably also need to specify some of these options in the child 
project: exportJars := true, transitiveAndroidLibs in Android := false — 
see the docs under “multi-project builds”.

Nick

On Monday, July 14, 2014 10:02:01 AM UTC+1, Shadowburst wrote:
>
> Thanks for the help. I've made a good start but I'm having trouble with 
> resources. My main project depends on a theme from my library project, but 
> when I run 'sbt package' from top-level, it can't find the theme. My 
> build.scala is like this:-
>
> import sbt._
> import sbt.Keys._
> import android.Keys._
>
> object MyBuild extends Build {
>     lazy val root = project in file(".") aggregate(preference, burly) 
> settings(
>         android.Plugin.androidCommands :+
>         (install <<= install in Android in burly) :+
>         (packageRelease <<= packageRelease in Android in burly) :+
>         (packageDebug <<= packageDebug in Android in burly): _*
>     )
>
>     lazy val preference = project settings(
>         android.Plugin.androidBuild ++ Seq(
>             organization := "shadowburst",
>             scalaVersion := "2.10.3",
>             platformTarget in Android := "android-19",
>             libraryDependencies += "com.intellij" % "annotations" % "12.0"
>         ):_*
>     )
>
>     lazy val burly = project settings(
>         android.Plugin.androidBuild(preference) ++ Seq(
>             organization := "shadowburst",
>             name := "burly",
>             version := "1.0",
>             scalaVersion := "2.10.3",
>             platformTarget in Android := "android-19",
>             useProguard in Android := true,
>             proguardOptions in Android ++= Seq(
>                 "-libraryjars burly/libs",
>                 "-keep class com.crashlytics.** { *; }",
>                 "-keep class com.fasterxml.jackson.** { *; }",
>                 "-keep class javax.** { *; }",
>                 "-keep class com.thoughtworks.paranamer.** { *; }"
>             )
>         ):_*
>     ) dependsOn preference
> }
>
> and I've checked that preference/bin/resources/res/values/values.xml does 
> have the theme. The full output, less the long stack trace from within SBT, 
> follows.
>
> [info] Loading project definition from /home/z1/shadowburst/burly/project
> [info] Compiling 1 Scala source to 
> /home/z1/shadowburst/burly/project/target/scala-2.10/sbt-0.13/classes...
> [info] Set current project to root (in build 
> file:/home/z1/shadowburst/burly/)
> [info] Generating R.java
> [warn] 
> /home/z1/shadowburst/burly/burly/bin/resources/res/values/values.xml:94: 
> error: Error retrieving parent for item: No resource found that matches the 
> given name 'Shadowburst.Light'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run 
> command:
>         
> /home/z1/packages/android/android-sdk-linux_x86-1.5_r3/build-tools/19.1.0/aapt
>  
> package -f --no-crunch -I 
> /home/z1/packages/android/android-sdk-linux_x86-1.5_r3/platforms/android-19/android.jar
>  
> -M /home/z1/shadowburst/burly/burly/bin/AndroidManifest.xml -S 
> /home/z1/shadowburst/burly/burly/bin/resources/res -A 
> /home/z1/shadowburst/burly/burly/bin/assets -m -J 
> /home/z1/shadowburst/burly/burly/gen -G 
> /home/z1/shadowburst/burly/burly/bin/proguard.txt --debug-mode 
> --custom-package com.shadowburst.burly -0 apk
> Error Code:
>         1
> Output:
>         
> /home/z1/shadowburst/burly/burly/bin/resources/res/values/values.xml:94: 
> error: Error retrieving parent for item: No resource found that matches the 
> given name 'Shadowburst.Light'.
>
>         at ...
> [error] (burly/android:rGenerator) 
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
> [error]         
> /home/z1/packages/android/android-sdk-linux_x86-1.5_r3/build-tools/19.1.0/aapt
>  
> package -f --no-crunch -I 
> /home/z1/packages/android/android-sdk-linux_x86-1.5_r3/platforms/android-19/android.jar
>  
> -M /home/z1/shadowburst/burly/burly/bin/AndroidManifest.xml -S 
> /home/z1/shadowburst/burly/burly/bin/resources/res -A 
> /home/z1/shadowburst/burly/burly/bin/assets -m -J 
> /home/z1/shadowburst/burly/burly/gen -G 
> /home/z1/shadowburst/burly/burly/bin/proguard.txt --debug-mode 
> --custom-package com.shadowburst.burly -0 apk
> [error] Error Code:
> [error]         1
> [error] Output:
> [error]         
> /home/z1/shadowburst/burly/burly/bin/resources/res/values/values.xml:94: 
> error: Error retrieving parent for item: No resource found that matches the 
> given name 'Shadowburst.Light'.
> [error] Total time: 4 s, completed 14-Jul-2014 09:58:17
>

-- 
You received this message because you are subscribed to the Google Groups 
"scala-on-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to