Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Shrykar · Jul 09, 2017 at 08:22 PM · androidandroid buildandroid-manifesttwitter

Gradle build error 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="@string/app_name" android:theme="@style/UnityThemeSelector" android:debuggable="false" android:isGame="true" android:banner="@drawable/app_banner">

====================================================================================

SOLUTION AS OF JULY 14TH

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.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Shrykar · Jul 12, 2017 at 10:28 PM 0
Share

I think I the error has something to do with this specifically.

I may have isolated $$anonymous$$e:

I'm not sure but I think there is either a missing file: android:icon, android:label, android:theme. And that android debuggable is conflicting somewhere.

I cannot seem to pinpoint where the manifest in fabric(twitter) stores these.

avatar image Shrykar · Jul 14, 2017 at 03:10 PM 0
Share

The only fix that I have found is you must remove ALL of fabric and reinstall their Other plugin twitter$$anonymous$$it. https://dev.twitter.com/twitterkit/unity/installation

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by alex181189 · Jul 10, 2017 at 10:11 AM

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!

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Shrykar · Jul 12, 2017 at 10:26 PM 0
Share

$$anonymous$$y code was a 9 where yours is a 6. I don't know what that means unfortunately. I think I may be missing a file that the outgoing android manifest is looking for.

avatar image JohnTube · Jul 13, 2017 at 01:23 PM 0
Share

check solution here: https://stackoverflow.com/questions/43452188/unity-5-6-custom-gradle-configuration-with-fabric

avatar image Shrykar JohnTube · Jul 13, 2017 at 08:54 PM 0
Share

Hey, I didn't have the required karma in order to comment on the other post.

This solution looks like it could help a lot. I'm not sure what you are changing around where. Would it be possible for you to give some more specific directions on the other post?

avatar image alex181189 JohnTube · Jul 14, 2017 at 01:30 PM 0
Share

Seems like a good solution, could you guide me better? I'm a little lost, I'm using the latest version of unity 2017.1.0f3 Thank you!

avatar image
0

Answer by teexiii · Jan 07, 2018 at 04:47 PM

Try this: check if your project folder has more than one AndroidManifest.xml, just keep only 1 manifest file and rebuild.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

135 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Android build crashes on start up. 2 Answers

How to increase number of supported devices when publishing to the google play store 0 Answers

CommandInvokationFailure: Gradle build failed. unity 2019.4.22 1 Answer

com.android.tools.r8 compilation error please help 0 Answers

multiple apks to match certain devices 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges