New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime Exception #3920
Comments
That is strange. AssetManager.sSystem has always been available since Jelly
Bean.
Are you using the latest version of Robolectric? Can you demonstrate a test
case?
…On 27 May 2018 at 11:31, Rimjhim Bhadani ***@***.***> wrote:
Whenever I try to run the robolectric tests on my machine, I am facing a
runtime exception.
Here the error log:
java.lang.RuntimeException: java.lang.NoSuchFieldException: sSystem
at org.robolectric.util.ReflectionHelpers.setStaticField(ReflectionHelpers.java:174)
at org.robolectric.shadows.ShadowAssetManager.reset(ShadowAssetManager.java:900)
at org.robolectric.Shadows.reset(Shadows.java:1666)
at org.robolectric.Robolectric.reset(Robolectric.java:40)
at org.robolectric.android.internal.ParallelUniverse.resetStaticState(ParallelUniverse.java:44)
at org.robolectric.RobolectricTestRunner.beforeTest(RobolectricTestRunner.java:280)
at org.robolectric.internal.SandboxTestRunner$2.evaluate(SandboxTestRunner.java:203)
at org.robolectric.internal.SandboxTestRunner.runChild(SandboxTestRunner.java:109)
at org.robolectric.internal.SandboxTestRunner.runChild(SandboxTestRunner.java:36)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.robolectric.internal.SandboxTestRunner$1.evaluate(SandboxTestRunner.java:63)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMainV2.main(AppMainV2.java:131)
Caused by: java.lang.NoSuchFieldException: sSystem
at java.lang.Class.getDeclaredField(Class.java:2070)
at org.robolectric.util.ReflectionHelpers.setStaticField(ReflectionHelpers.java:172)
... 25 more
Since the potential error lies in configuration, I am also posting the
screenshots.
[image: default configurations]
<https://user-images.githubusercontent.com/26908195/40589401-280616f6-620a-11e8-89ab-28bef432606c.png>
[image: junit configurations]
<https://user-images.githubusercontent.com/26908195/40589402-291bd134-620a-11e8-8c48-275436605532.png>
Any help to fix the error is highly appreciated!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3920>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AGBaeJykyhL2QwdveyAOE0Ti1H_LSsS_ks5t2vEAgaJpZM4UPYRn>
.
|
@jongerrish
One of the test class is:
|
A previously failed repository download could result in this issue.
|
What @paddykily says sounds very plausible. Closing this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Whenever I try to run the robolectric tests on my machine, I am facing a runtime exception.
Here the error log:
Since the potential error lies in configuration, I am also posting the screenshots.
Any help to fix the error is highly appreciated!
The text was updated successfully, but these errors were encountered: