On Monday, 14 July 2014 10:12:26 UTC+1, Nick Stanchenko wrote: > > 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”. > Sorry, I was unclear. bin/ is generated by the build process, and the XML file I mentioned contains the resources from all my source XML files. Finding it there means I know that the resource is definitely getting found in my library project, it's just not making it across to my app project. Perhaps the theme is getting stripped because it's not used in the library project itself? That said, when I look at the aapt command line that SBT is generating, it doesn't seem to have any input from the library at all: it doesn't use the generated directories, and the only imported JAR is android.jar. The generated bin/resources/res/ in the app project doesn't include any resources from the library project either. This all made me think I need to do something else to make the resource dependency work, but there's nothing else mentioned in the documentation (btw, I tried adding exportJars := true to both projects' settings, and it had no effect), nor in the example files.
However, I just found the SBT tests, and there's one for a multiproject build with libs and resources <https://github.com/pfn/android-sdk-plugin/blob/master/sbt-test/android-sdk-plugin/multiproject-lib-with-resources/project/build.scala>, so I looked in there to see what I was missing. I cargo-culted the androidBuildApklib bit into my library project and the localProjects into my app project, and that fixed the error. It looks like the documentation and examples are out of date, perhaps. Now I just need to get everything else working! -- 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.
