Software Archive
Read-only legacy content

angular-localization failed Intel XDK build

Angel_T_
Beginner
538 Views

Hi there,

I have Intel XDK 3619 and I have a project with specific set of Bower Libraries as well as with Cordova Plugins. I don't use IONIC - instead I replaced it with Angular Material.

All works just fine until I added angular-localization via Bower - once it is there I cannot build the project - it fails all the time.

The funny thing is - all this works just fine prior IONIC replacement with Angular Material but this is only guess. I can of course consider angular-localization replacement in case I cannot avoid, but ideally you can give me a hint on the topic.

Please find enclosed build log.

Best Regards,

Angel

0 Kudos
1 Solution
Jerroyd_M_Intel
Employee
538 Views

Hi Angel T.,

I was able to reproduce the build failure you suffered with the sample project you provided! I've analyzed the failure, and it is rooted in the Android build process's "aapt" tool! This tool packages the APK file, and as it does so, it enumerates through your project files, including bower component files. The angular-localization bower component has both an "angular-localization.nim.js" and an "angular-localization.nim.js.gz" file. For a reason I cannot explain, aapt will remove the "gz" extension, and then fail because there are now two minimized angular localization scripts! Try removing the gz file, and you're build should succeed. If you do not need the gz file, then you're good to go!

Sidenote: I'm working on a patch for the build system to provide users a more verbose compile log, so you and other users will be able to find this issue without needing to go to the forums to have an Intel XDK engineer look at our debug logs!

Reference: http://stackoverflow.com/questions/4666098/why-does-android-aapt-remove-gz-file-extension-of-assets

View solution in original post

0 Kudos
5 Replies
PaulF_IntelCorp
Employee
538 Views

I am not seeing anything obvious in the build file. How big is your project folder? If it's larger than ~400MB that can cause the build system to fail.

0 Kudos
Angel_T_
Beginner
538 Views

Nope - my entire project folder size is ~ 74MB. I am enclosing also both bower package and Intel XDK project files - these will allow you to see which exactly Bower packages and plugins I am using.

Update:

I can confirm this is not project size related issue - if I change this angular-localization Bower package with another one e.g. angular-translation, which in fact is bigger, hence the total project size increases, I can build the project successfully.

The remaining question is - why I cannot build a Intel XDK project with angular-localization package?

Update 2:

I can confirm that Intel XDK has issue when angular-localization Bower package is added. Here are the steps:

  1. I've just created a brand new Cordova project and keep it as it is - with default plugins.
  2. Build it, just to confirm all is good
  3. Added (via Bower) ONLY angular-localization package only. Added version is 1.2.1. The package itself added three dependencies - angular, angular-cookies, angular-sanitize - all three are version 1.5.8
  4. Attempt to build again - build failed. Please find enclosed build log - CordovaFailedLog-20161027.txt file.

Since I build the project where three above dependencies are present, the only one which actually breaks the build in my opinion is angular-localization.

Hope you can fix that or at least give me some hints how to avoid this unpleasant issue.

 

0 Kudos
PaulF_IntelCorp
Employee
538 Views

This is indeed an odd failure. I'll let our build expert know, he might be able to provide some insight into what's going on.

0 Kudos
Jerroyd_M_Intel
Employee
539 Views

Hi Angel T.,

I was able to reproduce the build failure you suffered with the sample project you provided! I've analyzed the failure, and it is rooted in the Android build process's "aapt" tool! This tool packages the APK file, and as it does so, it enumerates through your project files, including bower component files. The angular-localization bower component has both an "angular-localization.nim.js" and an "angular-localization.nim.js.gz" file. For a reason I cannot explain, aapt will remove the "gz" extension, and then fail because there are now two minimized angular localization scripts! Try removing the gz file, and you're build should succeed. If you do not need the gz file, then you're good to go!

Sidenote: I'm working on a patch for the build system to provide users a more verbose compile log, so you and other users will be able to find this issue without needing to go to the forums to have an Intel XDK engineer look at our debug logs!

Reference: http://stackoverflow.com/questions/4666098/why-does-android-aapt-remove-gz-file-extension-of-assets

0 Kudos
Angel_T_
Beginner
538 Views

Hey Jerroyd,

Thanks for your answer you saved my day, man!

Cheers,

Angel

0 Kudos
Reply