Build APK problem with uglification


#1

Hi,

when I try build APK with Webpack I’ve got this error. I really don’t know where should be the problem and how to solve it.
When I run tns run android on real device or on emulator, then it works. But when I try to build signed APK with webpack I ve got this error.

Thank you

`FAILURE: Build failed with an exception.

Where:
Build file ‘/Users/roman/Desktop/eSports/skslovanbratislava/platforms/android/build-tools/android-static-binding-generator/build.gradle’ line: 284

What went wrong:
Execution failed for task ‘:asbg:generateBindings’.

Process ‘command ‘/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/java’’ finished with non-zero exit value 1


#2

Try to go through entire log, if web pack fails it would definitely give some valid info at the end of web pack compilation logs.


#3

What are the command line arguments that you are initiating the build with? Is there uglify involved? Please try to be as descriptive as possible when asking for help on the forums!


#4

Sorry. I running it like this.
tns build android --release --key-store-path /Users/roman/Desktop/eSports/skslovanbratislava/cert/android/android_publish.keystore --key-store-password secret --key-store-alias skslovanbratislava --key-store-alias-password secret --copy-to skslovanbratislava.apk


#5

Where I could find this log?


#6

Looking at the command doesn’t seem you are using webpack?


#7

Omg sorry my fault. This is command which I am using. This causing error.

tns build android --bundle --env.aot --env.uglify --env.snapshot --key-store-path /Users/roman/Desktop/eSports/skslovanbratislava/cert/android/android_publish.keystore --key-store-password secret? --key-store-alias secret? --key-store-alias-password secret? --copy-to skslovanbratislava.apk


#8

Doesn’t look like you are doing a release build, --release option is missing. Try with release option, if issue remains try uploading the entire log.


#9

Also, I’d suggest trying without --env.uglify and checking whether the error persists.


#11

@Pete.K When I remove --env.uglify it’s works. But thats weird. I want to compile APK with uglification :frowning: