Comments (7)
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 [email protected]
on 5 Nov 2013 at 7:40
from android-test-kit.
@Stephan - do you think this falls under the issues you're tackling with
gradlefication?
Original comment by [email protected]
on 5 Nov 2013 at 7:53
- Changed state: Accepted
from android-test-kit.
Issue 10 has been merged into this issue.
Original comment by [email protected]
on 5 Nov 2013 at 11:25
from android-test-kit.
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 [email protected]
on 6 Nov 2013 at 3:28
Attachments:
from android-test-kit.
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 [email protected]
on 7 Jan 2014 at 11:46
from android-test-kit.
Please try again with the new release. We fixed the duplicate dependencies
issue.
Original comment by [email protected]
on 9 Jan 2014 at 7:20
- Changed state: Fixed
from android-test-kit.
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 [email protected]
on 9 Jan 2014 at 7:22
from android-test-kit.
Related Issues (20)
- ActivityFinisher should wait until all finishing Activities are completely destroyed before running next test
- withText matches Buttons too HOT 1
- DexException Multiple dex files define Ljunit/extenstions/ActiveTestSuite$1; HOT 4
- withContentDescription doesn't have resId overload
- AndroidJUnitRunner cannot create ActivityUnitTestCase's target activity HOT 3
- Adding "androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'" to dependencies causes build to fail HOT 3
- AndroidJUnitRunner doesn't run JUnit test with clear JUnit4 style HOT 1
- Espresso2.0 (bundled with guava) - NoSuchMethodError while initializing Espresso HOT 1
- Google maps support
- AndroidJUnit4 should skip tests with failing assumptions
- scrollTo() is not working?
- is enabled doesn't match the selected view HOT 1
- Cannot build on Maven 3.2.5
- Clicking on Component when developer don't know the ID of the component
- Espresso does not wait until SwipeRefreshLayout RefreshListener finished HOT 1
- Unable to switch on EditText overflowed by auto-complete view
- Russian text in EditText throws an exception
- Russian letter
- Unregistering idling resource causes the Espresso to think we have busy idling resources HOT 1
- Update Support Annotations version used by Espresso Contrib
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-test-kit.