记录一次从MTK移植应用源码到RK平台后,编译是出现 *_intermediates 生成异常的问题
1、*_intermediates 依赖找不到
FAILED: ninja: 'out/target/common/obj/JAVA_LIBRARIES/mediatek-framework_intermediates/exported-sdk-libs', needed by 'out/target/common/obj/APPS/FactoryMode_intermediates/exported-sdk-libs', missing and no known rule to make it
上面是由于MTK与RK的framework模块名称定义不同修改下配置即可,如下:
MTK:
LOCAL_JAVA_LIBRARIES :=mediatek-framework \
telephony-common
RK:
LOCAL_JAVA_LIBRARIES :=framework \
telephony-common
2、应用对应的*_intermediates 生成异常
FAILED: out/target/common/obj/APPS/FactoryMode_intermediates/classes.dex
/bin/bash -c "(rm -f out/target/common/obj/APPS/FactoryMode_intermediates//classes*.dex ) && (cp -fp out/target/common/obj/APPS/FactoryMode_intermediates/dex//classes*.dex out/target/common/obj/APPS/FactoryMode_intermediates/ )"
cp: bad 'out/target/common/obj/APPS/FactoryMode_intermediates/dex//classes*.dex': No such file or directory
*_intermediates生成异常的话,那极大可能是源码文件配置存在问题
像是这里的配置:
左边的为mtk,右边的rk
在rk平台编译时,修改下追加方式即可修复上述的intermediates生成异常问题