braintree / android-card-form

A ready-made card form layout that can be included in your Android app, making it easy to accept credit and debit cards.
MIT License
366 stars 128 forks source link

Android build error while using AAPT2 #30

Closed vverbytskyi10 closed 7 years ago

vverbytskyi10 commented 7 years ago

General information

Issue description

When I'm trying to build an APK, that contains "drop-ui" library, I am receiving next issue Error: values.xml:3821 (integer) -1 is less than minimum integer 0 Opening this file gives me next results:

``

Here is interesting the next line <item name="android:numColumns">auto_fit</item>. Android docs say, that "auto_fit" parameter has value "-1", but seems AAPT2 can't merge integers that contains values less than 0

lkorth commented 7 years ago

I encounter a similar error when compiling with the alpha build plugin.

It seems a bit like this is a bug in AAPT2 if it can't handle valid (-1) Android values. Given the alpha nature of these tools, we're happy to accept any workarounds you may have, but we'll probably wait until they mature a bit before upgrading to and supporting them.

lkorth commented 7 years ago

android-card-form is currently being built with v25.x of the support library, in v26 auto_fit was changed to avoid this error. Until v26 of the support library comes out of beta and android-card-form can be updated to use it, please add android.enableAapt2=false to your gradle.properties file to avoid this error.