-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Cucumber-JVM v1.2.3 (and v1.2.4) fails to build for Android #893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'll take a look at this. I wonder - is there a way this could have been discovered by an automated test you think? |
Building the integration test for cucumber-android, that is the project examples/android/android-test would have discovered this. The caveat is that to build it you need a Android SDK installed, and to run it you also need an Android emulator running (or an Android device connected). Now Travis have better support for Android compared to when we used and Android SDK to build cucumber-android itself - but still beta they write. I just rebased the PR where I worked on running the integration test (examples/android/android-test) and example (examples/android/cukeulator + examples/android/cukeulator-test) for Android, and as expected the issue is disclosed on Travis |
@aslakhellesoy this can absolutely be discovered by an automated test. We use Animal Sniffer for all of our tests. It allows us to use the Java 7 language features while making sure we don't use any Java 7 libraries. |
Animal sniffer doesn't even have a README. That smells like abandonware to me. |
It is not abandonware. The Codehaus website shutdown recently but the code
|
Here is a link to OkHttp's usage. Animal Sniffer is very stable from my https://github.com/square/okhttp/pull/194/files
|
Looks like someone did make a documentation site:
|
Abandonware isn't inherently bad, as long as it works, when it stops working, we can do something else. Perhaps by then the travis android support will be sufficient. I bet this works by checking the bytecode to see what JDK your stuff is compiled against and extends that test to the dependency jar files you've got. That's probably stable enough to keep using, even if it is abandonware. |
I bet I can probably make this happen pretty quickly. Perhaps that'll be something I get to this week, if it doesn't get gotten to first by someone else :) |
What is the latest version that is known to work? I was adding support for Cucumber to my existing android app. Added the following JAR files:
Getting this error for "./gradlew --info clean assembleDebug":
If I remove "cucumber-jvm-deps-1.0.5.jar" from the libs directory, build works correctly. Which JAR file should I downgrade to get cucumber working for the Android App? |
Downgrading to cucumber-jvm-deps-1.0.3.jar works! |
Hi! So we finally figured out how to make it run correctly based on what @emaillenin said. Just use the following setup in your build.gradle file:
Hope this helps someone! |
Are there any plans to permanently fix this so we don't need to manually edit this library's dependencies? |
@programmerdave you saved my life :) |
@programmerdave This information needs to be somewhere far more prominent for newcomers to this project |
…o that it compiles on Android projects using java 7. Fix layout issue where buttons rendered off margin in API 21+ causing the Espresso 90% condition to fail and then causing all the tests to fail
@programmerdave You saved the day. Thx. |
@urbantom Yeah, I'm a little concerned about this as well. Whether or not development on Cucumber JVM is moving forward, there seems to be little interest in first-class Android support. Thankfully, I haven't noticed any major bugs with @programmerdave's suggestion so infrequently updated does not mean bad. That being said, it makes me nervous if any bugs crop up with newer Android releases. |
At the moment the best way to get first class android support is by doing it yourself. I reckon if some one could help with #824 we'd at least stop breaking Android support. :D |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
As reported on the mailing list, Cucumber-JVM release v1.2.3 (and v1.2.4) fails to build for Android. The issue occurred when Cucumber-JVM-Deps was updated to use XStream v1.4.8, which contains two classes (com.thoughtworks.xstream.mapper.LambdaMapper.class and com.thoughtworks.xstream.converters.reflection.LambdaConverter.class) compiled to the byte code version of Java8 (major version 52), and classes of that byte code version cannot be included in an Android dex file.
cucumber-attic/cucumber-jvm-deps#4 fixes the problem by filtering out those two classes from the Cucumber-JVM-Deps jar file.
The text was updated successfully, but these errors were encountered: