Skip to content

app build inside child_process fails #46

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

Open
wendt88 opened this issue Oct 11, 2019 · 2 comments
Open

app build inside child_process fails #46

wendt88 opened this issue Oct 11, 2019 · 2 comments
Assignees

Comments

@wendt88
Copy link

wendt88 commented Oct 11, 2019

I tried to automate the build process and run the command with a child_process.
I tried the exec and spawn methods, but get always the same error:

Please change the name of one of the extended classes.
File:<APPROOT>\platforms\android\app\src\main\java\com\tns\FragmentClass.java Class: com.tns.FragmentClass
        at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:112)
        at org.nativescript.staticbindinggenerator.Main.main(Main.java:53)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:runSbg'.
> Process 'command 'C:\Program Files\AdoptOpenJDK\jdk8u192-b12\bin\java.exe'' 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. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 43s
Command gradlew.bat failed with exit code 1

when I remove the workers it builds correctly. is there maby an option to get it work, or is it a bug?

@dmdnkv
Copy link

dmdnkv commented Nov 18, 2019

The same problem.
However, it happens even after just cloning this repository, install and build without any additional actions.

node --version
v10.14.0

tns --version
6.2.0

java -showversion
java version "1.8.0_211"

Android SDK Build Tools: 28.0.3
Windows 10 Enterprise 1809 17763.615

git clone https://github.com/NativeScript/worker-loader.git
cd demo-angular
npm install
tns build android
...

Webpack compilation complete. Watching for file changes.
Webpack build done!
Project successfully prepared (android)
Building project...
Gradle build...
         + setting applicationId
         + applying user-defined configuration from C:\Projects\worker-loader\demo-angular\app\App_Resources\Android\app.gradle
         + using android X library androidx.legacy:legacy-support-v4:1.0.0
         + adding nativescript runtime package dependency: nativescript-optimized-with-inspector
         + adding aar plugin dependency: C:\Projects\worker-loader\demo-angular\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar

Error executing Static Binding Generator: File already exists. This may lead to undesired behavior.
Please change the name of one of the extended classes.
File:C:\Projects\worker-loader\demo-angular\platforms\android\app\src\main\java\com\tns\FragmentClass.java Class: com.tns.FragmentClass
Detailed log here: C:\Projects\worker-loader\demo-angular\platforms\android\build-tools\runSbg.log

Command gradlew.bat failed with exit code 1

Removal of both workers from the project leads to a successful build.
Any suggestions?

@wendt88
Copy link
Author

wendt88 commented Nov 18, 2019

maby #41 will fix this issue too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants