0
votes

I have successfully sync the source code of android-6.0.1_r79 from AOSP. Now, I got the following error while I was trying to build the source code. Anyone can tell me how I can fix it, and finish a successful build? Thanks much in advance.

The following line appears many times:

cts/tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java:1: error: illegal character: \0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ^

cts/tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java:1: error: illegal character: \0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^

cts/tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java:1: error: reached end of file while parsing

And then, I see this failure:

build/core/java.mk:394: recipe for target 'out/target/common/obj/APPS/CtsKeystoreTestCases_intermediates/classes-full-debug.jar' failed make: * [out/target/common/obj/APPS/CtsKeystoreTestCases_intermediates/classes-full-debug.jar] Error 41 make: * Waiting for unfinished jobs....

1
BTW, my ubuntu version is 16.04 LTS. OpenJDK version is 1.7. - lyjd

1 Answers

0
votes

Problem solved. The file cts/tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java is somehow broken. I opened it, and it shows many /00 illegal characters. So, I replaced it with another KeyChainTest.java file from another android branch. Rebuilt android, then I got build successfully.