NativeScript / nativescript-facebook

NativeScript plugin, wrapper of native Facebook SDK for Android and iOS
Apache License 2.0
79 stars 50 forks source link

transformClassesWithMultidexlistForDebug error when building for Android #164

Closed FranciZ closed 5 years ago

FranciZ commented 5 years ago

Which platform(s) does your issue occur on?

Android

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

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

Add plugin and try to build for Android.

Is there any code involved?

Not really just adding the plugin crashes the build with the below error:

* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list.

app.gradle

android {
  compileSdkVersion 28
  defaultConfig {
    generatedDensities = []
    applicationId = "custom.app.id"
    multiDexEnabled true
    minSdkVersion 19
    targetSdkVersion 28
  }
  aaptOptions {
    additionalParameters "--no-version-vectors"
  }
  dexOptions {
    javaMaxHeapSize "4g"
  }

  project.ext {
    googlePlayServicesVersion = "16.0.0"
    supportVersion = "28.0.0"
  }
}

before-plugins.gradle

android {
    project.ext {
        googlePlayServicesVersion = "16.0.0"
    }

    defaultConfig {
        multiDexEnabled true
        minSdkVersion 19
        targetSdkVersion 28
    }
}

I tried adding the multiDexEnabled to before-plugins.gradle after getting the error but it didn't solve the error.

FranciZ commented 5 years ago

2.2.2 version works, anything later than that produces the above mentioned error.

franculeto commented 5 years ago

La versión 2.2.2 funciona, cualquier cosa posterior a la que produce el error mencionado anteriormente.

Which version do you reference? I have same problems two days ago.

FranciZ commented 5 years ago

2.2.2 version of the plugin with the gradle setup I have above works.

DimitarTodorov commented 5 years ago

Hello @FranciZ,

I've tested all three demos in the repo, also I've created a new project and added the plugin, but I was unable to reproduce the issue. Can you please share a bit more info about the exact steps to reproduce it. Also if it is possible can you share a project where the issue is reproducible.

DimitarTodorov commented 5 years ago

Closing due to inactivity