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’