Skip to content

Unable to run with webpack and CLI from master for android #2707

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

Closed
vchimev opened this issue Apr 12, 2017 · 5 comments
Closed

Unable to run with webpack and CLI from master for android #2707

vchimev opened this issue Apr 12, 2017 · 5 comments

Comments

@vchimev
Copy link

vchimev commented Apr 12, 2017

Details:
User is unable to run the application with webpack and CLI from master for android, as it doesn't manage to clean properly the platforms folder.

Steps to reproduce:

npm install -g nativescript@next # 3.0.0-2017-04-11-8607
tns create appJS && cd appJS
tns run android
npm install --save-dev nativescript-dev-webpack
npm run start-android-bundle

Log:

:asbg:runAstParser
Running incremental build
finished with reading lines with js files
:asbg:generateBindings
Exception in thread "main" java.io.IOException: File already exists. This may lead to undesired behavior.
Please change the name of one of the extended classes.
/Users/vchimev/Work/tmp/appJS/platforms/android/src/main/java/com/tns/NativeScriptActivity.java
        at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:59)
        at org.nativescript.staticbindinggenerator.Main.main(Main.java:15)
:asbg:generateBindings FAILED

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/vchimev/Work/tmp/appJS/platforms/android/build-tools/android-static-binding-generator/build.gradle' line: 251

* What went wrong:
Execution failed for task ':asbg:generateBindings'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 8.98 secs
Multiple errors were thrown:
Command ./gradlew failed with exit code 1

Workaround:

rm -rf appJS/platforms/android

Suspected commit:
8dedbcd

@dtopuzov dtopuzov added this to the 3.0.0 milestone Apr 17, 2017
@vchimev vchimev removed this from the 3.0.0 milestone Apr 19, 2017
@vchimev
Copy link
Author

vchimev commented Apr 20, 2017

This issue has been handled in the nativescript-dev-webpack plugin to use platform remove/add instead of clean-app command: NativeScript/nativescript-dev-webpack#116

@dtopuzov, @rosen-vladimirov, @yyosifov, @sis0k0

What do you think to delete the magic clean-app command, If we are going to stick to this behavior?

@sis0k0
Copy link
Contributor

sis0k0 commented Apr 20, 2017

@vchimev,

Let's just deprecate it instead of removing it.

@pkoleva
Copy link
Contributor

pkoleva commented Apr 25, 2017

Let's decide what to do with the option and the close the issue.

@sis0k0
Copy link
Contributor

sis0k0 commented Apr 26, 2017

Let's keep it. I hope we can use it in the future instead of platform-remove, platform-add before bundling. There are some issues now with the android runtime which requires a bit more cleanup.

@dtopuzov
Copy link
Contributor

Closing this issue, since the original issue is fixed:
Unable to run with webpack and CLI from master for android
If we want to do something with magic clean-app command let's log separate issue.

@dtopuzov dtopuzov added this to the 3.0.0 milestone Apr 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants