Nativescript-ui-feedback: Build failing for Android when nativescript-pro-ui plugin installed.

Created on 23 Nov 2017  路  4Comments  路  Source: ProgressNS/nativescript-ui-feedback

Please, provide the details below:

Did you verify this is a real problem by searching Stack Overflow?

_Yes_

Tell us about the problem

Build failing for Android when nativescript-pro-ui plugin installed.

Which platform(s) does your issue occur on?

_Android_

Please provide the following version numbers that your issue occurs with:

  • Progress NativeScript UI version: 3.2.0
  • CLI: 3.3.1 _(Tried with CLI version 3.3.0 earlier, same issue.)_
  • Cross-platform modules: 3.3.0
  • Runtime(s): 3.3.1 for Android, 3.3.0 for iOS
    _(Earlier tried with tns-android 3.3.0, build failed. So we updated the android runtime to 3.3.1 and tried. Build is still failing.)_

Please tell us how to recreate the issue in as much detail as possible.

  1. Install nativescript-pro-ui plugin, using tns plugin add nativescript-pro-ui
  2. Build using tns build android
  3. Build Fails with error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformClassesWithDexForF0F1F2F3F4F5F6F7F8Debug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: Cannot merge new index 66969 into a non-jumbo instruction!

P.S.: The same plugin works fine when installed and built for iOS. tns-ios version 3.3.0, as mentioned above.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

_No code involved, as build fails without using any of the pro-ui components_

android

All 4 comments

Hi @sushant-j,
This error could be related to the application size and the fact that the application reached the limit for strings in a dex files.
You could try removing the Android platform and to add it again. For example:
tns platform remove android
tns platform add android
If this does not help, you could review this thread in StackOverflow and try some of the given solutions.

Regarding that, the given information is not enough to investigate the problem further. It would help if you could send us your project.
Thank you in advance for your cooperation.

Hey @tsonevn,
Thanks for your reply and solutions! I've already tried removing and adding the platform, which unfortunately did not work for me.

As for the other solutions related to increasing Dex size and/or using multidex mode, I'm currently trying those out.

Also, I cannot share my project code as the company I work for won't allow it, but I will try to create and isolate the problem in a similar project and share the link.

Update:
I enabled Multidex builds as demonstrated here and now Android builds pass.

Thanks @tsonevn for your suggestions!

P.S.: I was wondering if a note/info section should be added to docs/website which says that Multidex builds might be required for Android if you are using this plugin with a bunch of others and cross the 65k method calls limit imposed by Android.
I know it would have saved me a lot of time if something similar was there on the documentation page. I'd be happy to send a PR on the same if needed.

Hi @sushant-j
Excuse me for the delay in reply.
Indeed t would be great if you could make PR in the documentation Troubleshooting section, where you could describe the problem and the solution, which you have found.

Was this page helpful?
0 / 5 - 0 ratings