I'm trying using robolectric to mock somethings on my android app tests. Sadly after I include a external library on my project the tests crashed. Error info is about some library resource not found.
java.lang.RuntimeException: Could not find any resource from reference ResName{com.company.app:style/Theme_AppCompat_Light_NoActionBar} from style StyleData{name='AppTheme_Base', parent='Theme_AppCompat_Light_NoActionBar'} with theme null
Someone have this problem ?
Libraries that contain internal resources (AKA aar) need to be mapped on project.properties files (at src/main). The file content will be something like this (if you are using Android Studio):
android.library.reference.1=../app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.0
Take a look at the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With