Gradle build fail with Twitter Fabric

I am running into CommandInvokationFailure: Gradle build failed.

stderr[ C:\Users\User\Documents\Unity Games\BoilerplateServices\Temp\gradleOut\src\main\AndroidManifest.xml:9:

Error: Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one [HardcodedDebugMode]

android:name=“io.fabric.unity.android.FabricApplication” android:icon=“@drawable/app_icon” android:label=" @anon_76954444 /app_name" android:theme=" @ /UnityThemeSelector" android:debuggable=“false” android:isGame=“true” android:banner=“@drawable/app_banner”>

I went into the file and removed this line of code, built again and the line auto repopulates. How can I fix this?
I can provide any additional information

=========================================================================
SOLVED
SOLUTION AS OF JULY 14TH 2017

Remove ALL of the fabric plugin. Replace with twitterKit : Home · twitter-archive/twitter-kit-unity Wiki · GitHub

Follow the instructions and you are good to go. I was able to gradle build without error.

are you building a development build ? also, this may not be the real cause of failure. please attach the full error message you’re getting from gradle.

The same happens to me.

CommandInvokationFailure: Gradle build failed. /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -classpath “/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-2.14.jar” org.gradle.launcher.GradleMain “assembleRelease”

stderr[ …/Temp/gradleOut/src/main/AndroidManifest.xml:6: Error: Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one [HardcodedDebugMode]

  • 
    

Explanation for issues of type “HardcodedDebugMode”: It’s best to leave out the android:debuggable attribute from the manifest. If you do, then the tools will automatically insert android:debuggable=true when building an APK to debug on an emulator or device. And when you perform a release build, such as Exporting APK, it will automatically set it to false.

If on the other hand you specify a specific value in the manifest file, then the tools will always use it. This can lead to accidentally publishing your app with debug information.

1 errors, 0 warnings

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:transformClassesWithDexForRelease’.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lio/fabric/unity/android/BuildConfig;

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. ] stdout[ Incremental java compilation is an incubating feature. :preBuild UP-TO-DATE . . :transformClassesWithDexForRelease FAILED

thanks!

This is indeed the rest of the error. I’ve been ale to gradle build more than a few times, when I add in Fabric(twitter) I receive this error. Any idea on how to correct?

No I am not exporting to a development build.

Have you found any solutions?

Yes, as long as your problem has to do with This fabric/twitter error

Remove ALL of the fabric plugin. Replace with twitterKit : https://dev.twitter.com/twitterkit/unity/installation

Follow the instructions and you are good to go. I was able to gradle build without error.

Did you find a solution for this ?

Yea, there are known bugs within Fabrics SDK for Unity. It and Twitterkit are now separate. Stay away from Fabric.

Remove ALL of the fabric plugin. Replace with twitterKit : https://dev.twitter.com/twitterkit/unity/installation

Follow the instructions and you are good to go. I was able to gradle build without error.