Android6.0编译时需要使用openjdk7编译,然后服务器上还有别的项目需要使用openjdk6进行编译,于是在编译时就出现了一些问题
Installing recovery patch to system partition Warning: could not find SYSTEM/build.prop in <built-in function zip> using prebuilt recovery.img from BOOTABLE_IMAGES... using prebuilt boot.img from BOOTABLE_IMAGES... Traceback (most recent call last): File "./build/tools/releasetools/make_recovery_patch", line 53, in <module> main(sys.argv[1:]) File "./build/tools/releasetools/make_recovery_patch", line 49, in main common.MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img) File "/Public/zhangruifang/R3/android/build/tools/releasetools/common.py", line 1398, in MakeRecoveryPatch _, _, patch = d.ComputePatch() File "/Public/zhangruifang/R3/android/build/tools/releasetools/common.py", line 1089, in ComputePatch p = Run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) File "/Public/zhangruifang/R3/android/build/tools/releasetools/common.py", line 83, in Run return subprocess.Popen(args, **kwargs) File "/usr/lib/python2.7/subprocess.py", line 679, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory make: *** [out/target/product/msm8909/system/bin/install-recovery.sh] 错误 1 #### make failed to build some targets (06:30 (mm:ss)) ####
当时根本没往jdk版本问题那个方向考虑,因为在别的终端该项目可以编译成功,所以就将编译成功后的build.prop拷了过来,拷过来之后就会发现问题了,out目录下又会有一个文件找不到
Installing recovery patch to system partition Warning: could not find SYSTEM/build.prop in <built-in function zip> using prebuilt recovery.img from BOOTABLE_IMAGES... using prebuilt boot.img from BOOTABLE_IMAGES... Traceback (most recent call last): File "./build/tools/releasetools/make_recovery_patch", line 53, in <module> main(sys.argv[1:]) File "./build/tools/releasetools/make_recovery_patch", line 49, in main common.MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img) File "/Public/zhangruifang/R3/android/build/tools/releasetools/common.py", line 1398, in MakeRecoveryPatch _, _, patch = d.ComputePatch() File "/Public/zhangruifang/R3/android/build/tools/releasetools/common.py", line 1089, in ComputePatch p = Run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) File "/Public/zhangruifang/R3/android/build/tools/releasetools/common.py", line 83, in Run return subprocess.Popen(args, **kwargs) File "/usr/lib/python2.7/subprocess.py", line 679, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory make: *** [out/target/product/msm8909/system/bin/install-recovery.sh] 错误 1 #### make failed to build some targets (06:30 (mm:ss)) ####
先在项目的Android目录下执行版本切换命令. jdk7.sh ,这个是切换版本的脚本文件
然后到根目录下去执行source .profile命令,然后再到项目Android目录下去编译,ok问题解决