Robolectric: ShadowOf fails to compile with error: cannot access EuiccManager on 4.0-beta-1 targeting API 26

Created on 21 Oct 2018  ·  3Comments  ·  Source: robolectric/robolectric

Description

When changing target API to 26, existing tests hang with Robolectric 3.5.1. Upgrading to Robolectric 3.8 did not help. We upgraded to 4.0-beta-1 and mosts tests work but those that use shadowOf fail to compile with error cannot access EuiccManager.

Steps to Reproduce

  1. Pull code from https://github.com/opendatakit/collect/pull/2619/commits/9bfd0215dc34c79521534cb1862f6cd2d85d0243
  2. Run testDebugUnitTest gradle task
  3. See compile errors

Robolectric & Android Version

robolectric 4.0-beta-1, shadows-multidex 4.0-beta-1
target SDK 26
compile SDK 27

Link to a public git repo demonstrating the problem:

https://github.com/opendatakit/collect/pull/2619/commits/9bfd0215dc34c79521534cb1862f6cd2d85d0243

Most helpful comment

Try compiling against Android 28. Compiling against 28 is required for
Robolectric 4.0

On Sat, Oct 20, 2018, 5:05 PM Hélène Martin notifications@github.com
wrote:

Description

When changing target API to 26, existing tests hang with Robolectric
3.5.1. Upgrading to Robolectric 3.8 did not help. We upgraded to 4.0-beta-1
and mosts tests work but those that use shadowOf fail to compile with
error cannot access EuiccManager.
Steps to Reproduce

  1. Pull code from opendatakit/collect@9bfd021
    https://github.com/opendatakit/collect/commit/9bfd0215dc34c79521534cb1862f6cd2d85d0243
  2. Run testDebugUnitTest gradle task
  3. See compile errors

Robolectric & Android Version

robolectric 4.0-beta-1, shadows-multidex 4.0-beta-1
target SDK 26
compile SDK 27
Link to a public git repo demonstrating the problem:

opendatakit/collect@9bfd021
https://github.com/opendatakit/collect/commit/9bfd0215dc34c79521534cb1862f6cd2d85d0243


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/robolectric/robolectric/issues/4034, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AD2hB-DsK7TNfcEEUfX3BxM0doPUVodgks5um7pjgaJpZM4XyMnt
.

All 3 comments

Try compiling against Android 28. Compiling against 28 is required for
Robolectric 4.0

On Sat, Oct 20, 2018, 5:05 PM Hélène Martin notifications@github.com
wrote:

Description

When changing target API to 26, existing tests hang with Robolectric
3.5.1. Upgrading to Robolectric 3.8 did not help. We upgraded to 4.0-beta-1
and mosts tests work but those that use shadowOf fail to compile with
error cannot access EuiccManager.
Steps to Reproduce

  1. Pull code from opendatakit/collect@9bfd021
    https://github.com/opendatakit/collect/commit/9bfd0215dc34c79521534cb1862f6cd2d85d0243
  2. Run testDebugUnitTest gradle task
  3. See compile errors

Robolectric & Android Version

robolectric 4.0-beta-1, shadows-multidex 4.0-beta-1
target SDK 26
compile SDK 27
Link to a public git repo demonstrating the problem:

opendatakit/collect@9bfd021
https://github.com/opendatakit/collect/commit/9bfd0215dc34c79521534cb1862f6cd2d85d0243


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/robolectric/robolectric/issues/4034, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AD2hB-DsK7TNfcEEUfX3BxM0doPUVodgks5um7pjgaJpZM4XyMnt
.

Thanks so much, that did do the trick! 🙏

It might be something useful to add to the changelog.

Really appreciate the work you do on robolectric! 🎉

error: cannot access EuiccManager is still occur.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mvdan picture mvdan  ·  4Comments

SaeedMasoumi picture SaeedMasoumi  ·  3Comments

brettchabot picture brettchabot  ·  3Comments

LeonardoValderas picture LeonardoValderas  ·  4Comments

vaibhavpali picture vaibhavpali  ·  3Comments