Error "Could not compile resources"

Last edited on

General

This can occur during 'instrument and deploy' of the Android application through Squish.

This is either visible in the Error trace the IDE shows or the library log of the support information.

In most cases this is caused by the aapt/aapt2 tool provided by the Android SDK, which consider "$" characters in resource names to be invalid.

Solution

Linux

  1. Rename the following files:

    <SQUISHDIR>/bin/aapt to aapt-disabled

    <SQUISHDIR>/bin/aapt2 to aapt2-disabled

  2. Download the aapt_64 binary from this Git repository (direct link for Linux; AMD64/x86_64):

         aapt_64

  3. Copy or move the binary to <SQUISHDIR\>\bin and rename it to aapt.

macOS

  1. Rename the following files:

    <SQUISHDIR>/bin/aapt to aapt-disabled

    <SQUISHDIR>/bin/aapt2 to aapt2-disabled

  2. Download the aapt_64 binary for your operating system from this Git repository (direct link for macOS; AMD64/x86_64):

         aapt_64

  3. Copy or move the binary to <SQUISHDIR\>\bin and rename it to aapt.

Windows

  1. Rename the following files:

    <SQUISHDIR>/bin/aapt.exe to aapt-disabled.exe

    <SQUISHDIR>/bin/aapt2.exe to aapt2-disabled.exe

  2. Download the aapt_64.exe binary for your operating system from this Git repository (direct link for Windows; AMD64/x86_64):

         aapt_64.exe

  3. Copy or move the binary to <SQUISHDIR\>\bin and rename it to aapt.exe.