Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Angel_T_
Beginner
101 Views

angular-localization failed Intel XDK build

Jump to solution

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

Tags (2)
0 Kudos
1 Solution
Jerroyd_M_Intel
Employee
101 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

5 Replies
PaulF_IntelCorp
Employee
101 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.

Angel_T_
Beginner
101 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.

 

PaulF_IntelCorp
Employee
101 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.

Jerroyd_M_Intel
Employee
102 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

Angel_T_
Beginner
101 Views

Hey Jerroyd,

Thanks for your answer you saved my day, man!

Cheers,

Angel

Reply