[BUG] Fabric for Unity gradle build CommandInvokationFailure

unity

#1

I am able to build and use twitter in a clean Unity project. When I switch to gradle build it fails. I must be able to use a gradle build or else I will have to axe this plugin.

The first error is: CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_131\bin\java.exe -classpath “C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-2.14.jar” org.gradle.launcher.GradleMain “assembleRelease”

stderr[
C:\Users\User\Documents\Unity Games\TwitterSDK\Temp\gradleOut\tweet-composer\build\intermediates\bundles\release\res\layout\tw__app_card.xml:26: AAPT: No resource identifier found for attribute ‘tw__image_aspect_ratio’ in package ‘com.twitter.sdk.android.tweetcomposer’

*****If I remove tw__app_card.xml I am besieged with further errors.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:tweet-composer:processReleaseResources’.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘C:\Users\User\AppData\Local\Android\android-sdk\platforms\build-tools\25.0.3\aapt.exe’’ finished with non-zero exit value 1

How can I fix this?
C:\Users\User\Documents\Unity Games\TwitterSDK\Temp\gradleOut\tweet-composer\build\intermediates\bundles\release\res\layout\tw__app_card.xml:26: AAPT: No resource identifier found for attribute ‘tw__image_aspect_ratio’ in package ‘com.twitter.sdk.android.tweetcomposer’


#2

Hi,
Please try our newly released Twitter Kit 3 for Unity: https://dev.twitter.com/twitterkit/unity/installation
It removes app install card support from the Composer so it may fix your issue.

regards,
Adam


#3

Thank you! This solved all my problems.
Will fabric be changed in the future or is twitterkit the way to go?


#4

Twitter Kit is now fully separate from Fabric so definitely time to move across :slight_smile:


#5

That is great to hear. Thanks again


#7