spoon: java.lang.ArrayIndexOutOfBoundsException when using gradle plugin 3.0.0.x
When trying to use Spoon with the latest build tools / gradle plugin, the spooner-runner crashes when attempting to analyze the AndroidManifest of the test app:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 96
at com.squareup.spoon.internal.thirdparty.axmlparser.StringBlock.getShort(StringBlock.java:255)
at com.squareup.spoon.internal.thirdparty.axmlparser.StringBlock.getRaw(StringBlock.java:110)
at com.squareup.spoon.internal.thirdparty.axmlparser.StringBlock.read(StringBlock.java:77)
at com.squareup.spoon.internal.thirdparty.axmlparser.AXMLParser.doStart(AXMLParser.java:201)
at com.squareup.spoon.internal.thirdparty.axmlparser.AXMLParser.<init>(AXMLParser.java:48)
at com.squareup.spoon.SpoonInstrumentationInfo.parseFromFile(SpoonInstrumentationInfo.java:62)
at com.squareup.spoon.SpoonRunner.run(SpoonRunner.java:115)
at com.squareup.spoon.Main.main(main.kt:35)
Maybe the AXML format has changed?
When using the Android Studio APK analyzer, the Manifest looks fine.
I reproduce using the master branch built locally. I added some log to try to figure out what is wrong. It’s hard to say what the problem is. The length returned at line 95 of StringBlock
(1285) seems way too big for my string blocks. m_strings
contains only 96 entries. Hence the crash when attempting to get the 96th entry.
Thanks.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 8
- Comments: 20 (4 by maintainers)
Could you please let me know when we can expect the final jar?
Yeah the URL in the README is the one you’d add to your repositories{} block in Gradle.
On Thu, Oct 26, 2017 at 4:32 PM Sam Edwards notifications@github.com wrote:
The readme has a pointer to the snapshots Maven repo: https://github.com/square/spoon/#download
On Thu, Oct 26, 2017 at 4:20 PM Sam Edwards notifications@github.com wrote:
This is output from the spoon-runner jar referenced in the main README under “Execution”: https://search.maven.org/remote_content?g=com.squareup.spoon&a=spoon-runner&v=LATEST&c=jar-with-dependencies