Compiling Android N without Jack

1k Views Asked by At

I am trying to compile Android N while disabling Jack by setting: ANDROID_COMPILE_WITH_JACK := false in aosp/build/core/combo/javac.mk.

While compiling APP, there is always the error msg:

ninja: error: 'out/target/common/obj/APPS/Bluetooth_intermediates/with-local/classes.dex', needed by 'out/target/common/obj/APPS/Bluetooth_intermediates/classes.dex', missing and no known rule to make it
make: *** [ninja_wrapper] Error 1

Anyone has any idea about this err?

Thanks. Simmis.

1

There are 1 best solutions below

0
On

It should work this way, at least with Android Oreo it did for me. ninja-wrapper errors often indicate some inconsistencies, like changed JDK versions, etc.

Try a clean build before you try anything else.

<CHANGE AND CONFIGURE OPENJDK 8>
make -j<THREADS> clean
source build/envsetup.sh
make lunch
make -j<THREADS>

Also see another answer here: https://stackoverflow.com/a/44945349/726776 , you could also set the "NO-JACK" flag on the commandline