Android Studio 3.0 AAPT2 compilation failed - invalid resource file size

I use Android Studio 3.0 Canary 3 on Arch Linux and I play with it trying to make a small application. Did some research before posting the question, but none of the solutions I found work for me. Any help is appreciated. Thanks

  Error: Execution failed for task ': app: mergeDebugResources'.
 > Error: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.internal.aapt.AaptException: AAPT2 compile failed:
   aapt2 compile -o / home / xhensi / AndroidStudioProjects / FindRestaurant / app / build / intermediates / res / merged / debug /home/xhensi/AndroidStudioProjects/FindRestaurant/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values .xml
   Issues:
    - ERROR: /home/xhensi/AndroidStudioProjects/FindRestaurant/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:244 invalid dimen
    - ERROR: /home/xhensi/AndroidStudioProjects/FindRestaurant/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:245 invalid dimen
    - ERROR: /home/xhensi/AndroidStudioProjects/FindRestaurant/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:283 invalid dimen
    - ERROR: /home/xhensi/AndroidStudioProjects/FindRestaurant/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:309 invalid dimen
    - ERROR: /home/xhensi/AndroidStudioProjects/FindRestaurant/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xmlhaps10 invalid dimen
    - ERROR: /home/xhensi/AndroidStudioProjects/FindRestaurant/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xmlhaps12 invalid dimen
    - ERROR: /home/xhensi/AndroidStudioProjects/FindRestaurant/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml data13 invalid dimen
    - ERROR: /home/xhensi/AndroidStudioProjects/FindRestaurant/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml data14 invalid dimen
+7
android android-studio android-gradle gradle aapt
source share
1 answer

Update:

I found how to fix this problem. Hope this answer helps others too!

Apparently, the settings for my Linux formats were in German. I changed it to the USA. Write this command in your terminal:

export LC_NUMERIC="en_US.UTF-8"

source ~/.bashrc

Then in my case, it worked after rebooting the system (usually it should also work with shutting down the log).

Additional installation information:

https://askubuntu.com/questions/724338/how-to-set-lc-numeric-to-english-permanently

+12
source share

All Articles