question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error building for android after plugin has been added

See original GitHub issue

Hello,

I’m using tns version 3.4.1, atfer i have added the plugin to the project using

tns plugin add nativescript-mapbox

the command tns run android throws the following error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDexForF0F1F2F3F4F5F6F7F8F9Debug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException
: com.android.ide.common.process.ProcessException: Return code 1 for dex process

Plugin version is 4.0.0 and the environment is on MACOS

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
EddyVerbruggencommented, Jun 13, 2018

I ran into the same issue last week and indeed fixed it like this:

  // https://github.com/mapbox/mapbox-java/issues/782
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
1reaction
csprlcommented, Jun 12, 2018

I think I ran into the same issue on 4.1.0 (you didn’t show the entire stacktrace so I can’t be 100% sure), and it seems like a recent update in one of Mapbox’s SDKs, release notes here, is the cause of this. The Java 8 change to be precise. Forcing Gradle to use Java 8 by setting compileOptions (as per the release notes) in app/App_Resources/Android/app.gradle fixed the problem for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cordova error building after adding plugin - Stack Overflow
when I add any admob plugins. the following error message ... need to be able to build APK files via cordova and I...
Read more >
Known issues with Android Studio and Android Gradle Plugin
If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version...
Read more >
Android add-to-app build fails when using platform plugin that ...
When building an existing app and embedding flutter, and using the latest version of the url_launcher plugin, the build will fail because ...
Read more >
Upgrading your build from Gradle 5.x to 6.0
These plugins have been stable since Gradle 4.8. ... In Gradle 6.0, both pack and unpack errors will cause the build to fail,...
Read more >
Blog - Apache Cordova
cordova-plugin-device. Electron native support has been added. For Android, the sdkVersion property is now included on the window.device object ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found