Yermo / nativescript-mapbox

:statue_of_liberty: :tokyo_tower: :mount_fuji: Native OpenGL powered Maps, by Mapbox
MIT License
194 stars 94 forks source link

Error building for android after plugin has been added #225

Open SaraAbbood opened 6 years ago

SaraAbbood commented 6 years ago

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

anaszgh commented 6 years ago

Any news about this, i'm facing the same exact issue on TNS version 3.4.1

thiago-glauco commented 6 years ago

I got the same problem. I use this plugin in other apps, but since I upgraded nativescript I'm having this error only in the apps I try to build with mapbox plugin.

csprl commented 6 years ago

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.

thiago-glauco commented 6 years ago

Thanks, I'll test it tomorrow morning. Em terça-feira, 12 de junho de 2018 17:02:43 BRT, Casper Löfgren notifications@github.com escreveu:

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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

EddyVerbruggen commented 6 years ago

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
  }