Comments (4)
Yep, the setup instructions as is are wrong. Getting the same error.
Original comment by [email protected]
on 25 Jan 2015 at 8:07
from android-test-kit.
[deleted comment]
from android-test-kit.
The issue here is that the jar is getting written twice in one of these files:
'META-INF/DEPENDENCIES.txt'
'META-INF/LICENSE.txt'
'META-INF/NOTICE.txt'
'META-INF/NOTICE'
'META-INF/LICENSE'
'META-INF/DEPENDENCIES'
'META-INF/notice.txt'
'META-INF/license.txt'
'META-INF/dependencies.txt'
'META-INF/LGPL2.1'
'LICENSE.txt'
In order to avoid this add the following code you your app module's
build.gradle inside the android{}:
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'LICENSE.txt'
}
Also, the guide is missing a call to matches() here:
onView(withText("Hello world!")).check(matches(isDisplayed()));.
If you are running these tests right out of the new project template from Android Studio please note that the default string text for the TextView is "Hello world!" (note the "!"), and the sample test is looking for a View with "Hello world" (no "!")
Original comment by [email protected]
on 9 Mar 2015 at 6:06
from android-test-kit.
Original comment by [email protected]
on 16 Mar 2015 at 7:42
- Changed state: Accepted
from android-test-kit.
Related Issues (20)
- withText matches Buttons too HOT 1
- DexException Multiple dex files define Ljunit/extenstions/ActiveTestSuite$1; HOT 4
- withContentDescription doesn't have resId overload HOT 1
- AndroidJUnitRunner cannot create ActivityUnitTestCase's target activity 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 HOT 1
- AndroidJUnit4 should skip tests with failing assumptions
- scrollTo() is not working? HOT 1
- is enabled doesn't match the selected view HOT 2
- Cannot build on Maven 3.2.5 HOT 1
- Clicking on Component when developer don't know the ID of the component HOT 1
- Espresso does not wait until SwipeRefreshLayout RefreshListener finished HOT 1
- Unable to switch on EditText overflowed by auto-complete view HOT 1
- Russian text in EditText throws an exception HOT 2
- Russian letter HOT 1
- Unregistering idling resource causes the Espresso to think we have busy idling resources HOT 1
- Update Support Annotations version used by Espresso Contrib
- Espresso 2.0 in eclipse does not work
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.