Closed nightscape closed 9 years ago
Hi, sorry for delay (I'm on vacations with not much internet connection).
The problem seems to be with RoboSuiteRunner.appResourceLoader
, it doesn't resolve resources from aars, we may need to add paths for res
folders from aars, android-plugin extracts all aar dependencies in target/aars
, so we may just try going through all folders there and add res
to resource loader.
Will look into this once I'm back.
Looked a bit into it, don't have a working solution yet, but there is a work-around, the same as described in https://github.com/robolectric/robolectric/issues/1334
create /src/main/project.properties
file with path to aars
dir:
android.library.reference.1=../../target/aars/com.android.support-appcompat-v7-22.1.1
Will check how exactly this is used in robolectric and try passing this references directly in RobolectricSuite
, or we can just generate this file automatically (but this seems ugly).
RobolectricSuite
will automatically include exploded aar directories in robolectric manifest, it assumes that this libraries will be in target/aars
, this path is configurable as RobolectricSuite.aarsDir
field, should be overriden when using different layout (for example when using different sbt android plugin).
Hi @zbsz,
this is probably not directly related to robotest, but when I try to test an Activity that is styled with an AppCompat theme I get this error
I've created a reproducible test case here.
This issue seems to be known for Robolectric (here the most current issue for 3.0-SNAPSHOT). It seems that the solution requires using a specialized RobolectricGradleTestRunner, but I'm admittedly not understanding the entire discussion.
I'm thankful for any hints on how to fix this and I'll happily create a PR once I've found a solution :)
Best Martin