Markus
Markus

Reputation: 609

Android Compatibility Test Sutie (CTS) for Jelly Bean: INSTALL_FAILED_DEXOPT

I am trying to run the Android Compatibility Test for Jelly Bean. I am currently doing the following to build my Android source and then build the CTS:

cd "my-android-source-root"
source build/envsetup.sh
lunch 1
make
make cts

I then run the CTS with the following command:

cts-tradefed

Everything seems OK so far, I then kick off my emulator and see that it is picked up by my CTS instance.

Unfortunately when I try and run a test I get an error when the test tries to install a .apk package.

run cts -p android.os

This quickly returns the error:

E/CtsTest: Failed to install CtsTestStubs.apk. Reason: INSTALL_FAILED_DEXOPT

Have I missed out any steps or have I done anything wrong. If anyone has a working CTS from the AOSP I would be grateful for any advice.

Many Thanks.

Upvotes: 1

Views: 1849

Answers (2)

Ravi
Ravi

Reputation: 11

Run below commands in exact sequence to fix this problem:

$cd "my-android-source-root"
$source build/envsetup.sh
$lunch 1
$export DISABLE_DEXPREOPT=true
$make -j cts showcommands dist TARGET_PRODUCT=full WITH_DEXPREOPT=false
$make cts

Upvotes: 1

mattismyname
mattismyname

Reputation: 307

For me, I found that disabling dexpreopt resulted in installable apk files:

Before running "make cts", do this:

export DISABLE_DEXPREOPT=true

Upvotes: 1

Related Questions