Problem when building android --DGRADLE

Hello,

I am using this github for admob https://github.com/aToO57/AdMob but the thing is my application runs normally when I do normal build thing is then I use this command in building uno build --target=Android -DGRADLE I get this weird error and I don’t know how to solve it.

    Configuring (6.7 s)
    Compiling syntax tree (1.8 s)
    Generating code and data (1:13)
    Building Android app
    2/2: ThreeBont.apk
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Dex: Error converting bytecode to dex:
    Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzaoq;
    UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzaoq;
	at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:591)
	at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:546)
	at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:528)
	at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
	at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
	at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
	at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
	at com.android.dx.command.dexer.Main.run(Main.java:277)
	at com.android.dx.command.dexer.Main.main(Main.java:245)
	at com.android.dx.command.Main.main(Main.java:106)


    FAILURE: Build failed with an exception.

   * What went wrong:
   Execution failed for task ':app:transformClassesWithDexForArm7Debug'.
   > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: 
   java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: 
   Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

   * Try:
   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
   ## 2/2: ThreeBont.apk
   Incremental java compilation is an incubating feature.
   :app:copyArmeabi-v7aDebugSharedLibraryStlSo
  :app:compileThreeBontArmeabi-v7aDebugSharedLibraryThreeBontMainCpp
  :app:linkThreeBontArmeabi-v7aDebugSharedLibrary
  :app:ThreeBontArmeabi-v7aDebugSharedLibrary
  :app:stripSymbolsArmeabi-v7aDebugSharedLibrary
  :app:ndkBuildArmeabi-v7aDebugSharedLibrary
  :app:ndkBuildArmeabi-v7aDebugStaticLibrary UP-TO-DATE
  :app:processAndroidArm7DebugMainJniLibs
  :app:androidArm7Debug
  :app:preBuild UP-TO-DATE
  :app:preArm7DebugBuild UP-TO-DATE
  :app:checkArm7DebugManifest
  :app:preArm7ReleaseBuild UP-TO-DATE
  :app:prepareComAndroidSupportAnimatedVectorDrawable2340Library
  :app:prepareComAndroidSupportAppcompatV72340Library
  :app:prepareComAndroidSupportDesign2340Library
  :app:prepareComAndroidSupportRecyclerviewV72340Library
  :app:prepareComAndroidSupportSupportV42400Library
  :app:prepareComAndroidSupportSupportVectorDrawable2340Library
  :app:prepareComGoogleAndroidGmsPlayServicesAds940Library
  :app:prepareComGoogleAndroidGmsPlayServicesAdsLite940Library
  :app:prepareComGoogleAndroidGmsPlayServicesBase961Library
  :app:prepareComGoogleAndroidGmsPlayServicesBasement961Library
  :app:prepareComGoogleAndroidGmsPlayServicesClearcut940Library
  :app:prepareComGoogleAndroidGmsPlayServicesGass940Library
  :app:prepareComGoogleAndroidGmsPlayServicesGcm961Library
  :app:prepareComGoogleAndroidGmsPlayServicesIid961Library
  :app:prepareComGoogleAndroidGmsPlayServicesTasks961Library
  :app:prepareComGoogleFirebaseFirebaseAds940Library
  :app:prepareComGoogleFirebaseFirebaseAnalytics940Library
  :app:prepareComGoogleFirebaseFirebaseAnalyticsImpl940Library
  :app:prepareComGoogleFirebaseFirebaseCommon940Library
  :app:prepareComGoogleFirebaseFirebaseIid940Library
  :app:prepareArm7DebugDependencies
  :app:compileArm7DebugAidl
  :app:compileArm7DebugRenderscript
  :app:generateArm7DebugBuildConfig
  :app:generateArm7DebugAssets UP-TO-DATE
  :app:mergeArm7DebugAssets
  :app:generateArm7DebugResValues
  :app:generateArm7DebugResources
  :app:mergeArm7DebugResources
  :app:processArm7DebugManifest
  :app:processArm7DebugResources
  :app:generateArm7DebugSources
  :app:compileArm7DebugJavaWithJavac
  :app:compileArm7DebugSources
  :app:prePackageMarkerForArm7Debug
  :app:transformClassesWithDexForArm7Debug FAILED

  BUILD FAILED

  Total time: 1 mins 35.84 secs
  (unknown): E0200: Android build failed
  (1:36)

 Build completed in 179.18 seconds
    1 error

Which Fuse version are you on? Since 0.36 all builds are by default GRADLE, so you shouldn’t pass the flag.

And if you don’t pass it, does everything work alright?

Thanks for your reply,
I am using version Fuse 32.0 and yeah I used fuse build --target=android --run it works but never with flag -DGRADLE

Please upgrade. You should under no circumstance be on such an old version of Fuse — it’s over 6 months old, and we’re now at Fuse 1.1.1.