Closed GoogleCodeExporter closed 9 years ago
Workaround:
adb shell setprop dalvik.vm.dexopt-flags v=n,o=v
adb shell stop installd
adb shell start installd
reinstall the packages / run the test and it should be fine.
Background:
When you execute am instrument ... the classpath from the test apk and app apk
are combined. If duplicate class definitions exist (even if they are identical)
you'll get this exception.
The above set of adb commands disable the optimization that causes it to be a
problem.
Full fix is to muck the build scripts to prevent duplicate class elements
appearing in both the test apk and the app apk.
Original comment by thoma...@google.com
on 5 Nov 2013 at 7:40
@Stephan - do you think this falls under the issues you're tackling with
gradlefication?
Original comment by thoma...@google.com
on 5 Nov 2013 at 7:53
Issue 10 has been merged into this issue.
Original comment by thoma...@google.com
on 5 Nov 2013 at 11:25
If you exclude Guava from the test APK, it seems to solve this particular
problem, but some of the tests seem to fail. See attached patch.
[INFO] Tests run: 165, Failures: 4, Errors: 2
Original comment by YogurtE...@gmail.com
on 6 Nov 2013 at 3:28
Attachments:
I ran it with the patch and it finally worked but my results on a Nexus 5 are a
little different:
Tests run: 165, Failures: 4, Errors: 1
Original comment by Stath...@gmail.com
on 7 Jan 2014 at 11:46
Please try again with the new release. We fixed the duplicate dependencies
issue.
Original comment by vale...@google.com
on 9 Jan 2014 at 7:20
Thanks. It looks like this commit fixed the issue:
https://code.google.com/p/android-test-kit/source/detail?r=aaf0047dfd8543997d365
2b9d75a63ece95f18df#
Original comment by m...@bootstraponline.com
on 9 Jan 2014 at 7:22
Original issue reported on code.google.com by
m...@bootstraponline.com
on 23 Oct 2013 at 3:13