Android L preview issue

98 views
Skip to first unread message

Christine

unread,
Jul 5, 2014, 3:08:30 PM7/5/14
to robol...@googlegroups.com
I installed the Android L preview in my Eclipse, now I get a NumberFormatException because apparently Robolectric thinks the version number should always be a number. Is there a quick fix for this? It doesn't harm my tests, it's just that when I debug a test, the debugger stops at this point. This is the stack trace:

java.lang.NumberFormatException: For input string: "L"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:492)
at java.lang.Integer.parseInt(Integer.java:527)
at org.robolectric.AndroidManifest.getTagAttributeIntValue(AndroidManifest.java:260)
at org.robolectric.AndroidManifest.getTagAttributeIntValue(AndroidManifest.java:254)
at org.robolectric.AndroidManifest.parseAndroidManifest(AndroidManifest.java:143)
at org.robolectric.AndroidManifest.getTargetSdkVersion(AndroidManifest.java:289)
at org.robolectric.RobolectricTestRunner.pickSdkVersion(RobolectricTestRunner.java:294)
at org.robolectric.RobolectricTestRunner.getEnvironment(RobolectricTestRunner.java:268)
at org.robolectric.RobolectricTestRunner.access$100(RobolectricTestRunner.java:57)
at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:188)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:175)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Erich Douglass

unread,
Jul 10, 2014, 1:23:46 AM7/10/14
to robol...@googlegroups.com
Hi Christine,

No, I don't think there's an immediate fix for this. I assume that the
manifest parser just doesn't handle non-numbers. We could update the
parser, but since Android L will get a real version number at some
point (and it doesn't prevent your tests from failing), I'm not
inclined to fix it.
> --
> You received this message because you are subscribed to the Google Groups
> "Robolectric" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to robolectric...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages