Robolectric: NOTICE: legacy resources mode is deprecated

Created on 15 Apr 2019  路  3Comments  路  Source: robolectric/robolectric

Description

I upgrade my lib to 4.2.1 and my test are showing warnings "NOTICE: legacy resources mode is deprecated". I see the docs but i don't get the fix for this warnings.

Steps to Reproduce

Robolectric & Android Version

Link to a public git repo demonstrating the problem:

Most helpful comment

You need to add android.enableUnitTestBinaryResources=true to your gradle.properties unless you are using build tools 3.4 then there is no need.

I still see this warning using AGP 3.5.2.
Note: I have not set android.enableUnitTestBinaryResources=true

All 3 comments

I manually upgraded Robolectric version from 3.8 to 4.2.1
I have the same problem: "[Robolectric] NOTICE: legacy resources mode is deprecated; see http://robolectric.org/migrating/#migrating-to-40"
And: "[Robolectric] [path/to/the/test/class]: sdk=28; resources=LEGACY"

Android Studio Version: 3.3.2
Gradle Version: 4.10.1
Android Plugin Version: 3.3.2
Robolectric Version: 4.2.1

You need to add android.enableUnitTestBinaryResources=true to your gradle.properties unless you are using build tools 3.4 then there is no need.

http://robolectric.org/getting-started/

You need to add android.enableUnitTestBinaryResources=true to your gradle.properties unless you are using build tools 3.4 then there is no need.

I still see this warning using AGP 3.5.2.
Note: I have not set android.enableUnitTestBinaryResources=true

Was this page helpful?
0 / 5 - 0 ratings