编译原生相册报android-support-v13编译错误

柠檬虾小总结
                                                                                                                                                                                                                
【编译环境】
1,Linux操作系统
2,target = android-17
3,java = 1.6.0_33

最近老大让我搞Android原生的相册,编译原生相册报android-support-v13编译错误


Log如下:

aapt: warning: string 'saved' has no default translation in packages/apps/Gallery2/res; found: az az_AZ et hy ka km lo mn ms ne ne_NP si si_LK
Warning: AndroidManifest.xml already defines versionCode (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines versionName (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines targetSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.
make: *** No rule to make target `out/target/common/obj/JAVA_LIBRARIES/android-support-v13_intermediates/javalib.jar', needed by `out/target/common/obj/APPS/Gallery2_intermediates/classes-full-debug.jar'.  Stop.(没有依赖)
make: Leaving directory `/work/android-4.4'

解决方案:

avatarmind@ubuntu:/work/android-4.4/packages/apps/Gallery2$ ls
AndroidManifest.xml  assets  CleanSpec.mk   gen  jni_jpegstream  project.properties  src
Android.mk0           bin     gallerycommon  jni  proguard.flags  res                 src_pd

ls发现系统之前保存的是mk0文件,将其改为mk文件
avatarmind@ubuntu:/work/android-4.4/packages/apps/Gallery2$ mv Android.mk0 Android.mk

avatarmind@ubuntu:/work/android-4.4/packages/apps/Gallery2$ ls
AndroidManifest.xml  assets  CleanSpec.mk   gen  jni_jpegstream  project.properties  src
Android.mk           bin     gallerycommon  jni  proguard.flags  res                 src_pd

继续编译又报一个错(错误2)

Log如下:

make: *** No rule to make target `out/target/common/obj/JAVA_LIBRARIES/com.android.gallery3d.common2_intermediates/javalib.jar', needed by `out/target/common/obj/APPS/Gallery2_intermediates/classes-full-debug.jar'.  Stop.

解决方案:

在这个目录下去找com.android.gallery3d.common2
avatarmind@ubuntu:/work/android-4.4/packages/apps/Gallery2$ grep -rn "com.android.gallery3d.common2"
gallerycommon/Android.mk0:23:LOCAL_MODULE := com.android.gallery3d.common2
Binary file .Android.mk.swp matches
Android.mk:8:LOCAL_STATIC_JAVA_LIBRARIES += com.android.gallery3d.common2

发现gallerycommon/ 下Android.mk0文件
avatarmind@ubuntu:/work/android-4.4/packages/apps/Gallery2$ cd gallerycommon/; ls
Android.mk0  src

将其也改为mk文件
avatarmind@ubuntu:/work/android-4.4/packages/apps/Gallery2/gallerycommon$ mv Android.mk0 Android.mk
avatarmind@ubuntu:/work/android-4.4/packages/apps/Gallery2/gallerycommon$ ls
Android.mk  src

继续编译又报一个错(错误3)

Log如下:

make: *** No rule to make target `out/target/common/obj/JAVA_LIBRARIES/ 
libjni_jpegstream
_intermediates/javalib.jar', needed by `out/target/common/obj/APPS/Gallery2_intermediates/classes-full-debug.jar'.  Stop.

解决方案:

在这个目录下去找libjni_jpegstream
avatarmind@ubuntu:/work/android-4.4/packages/apps/Gallery2$ grep -rn "libjni_jpegstream"
jni_jpegstream/Android.mk0:7:LOCAL_MODULE := libjni_jpegstream
Binary file .Android.mk.swp matches
Android.mk:40:  LOCAL_JNI_SHARED_LIBRARIES := libjni_eglfence libjni_filtershow_filters librsjni libjni_jpegstream
Android.mk:42:  LOCAL_REQUIRED_MODULES := libjni_eglfence libjni_filtershow_filters libjni_jpegstream

发现jni_jpegstream/下Android.mk0文件
avatarmind@ubuntu:/work/android-4.4/packages/apps/Gallery2$ cd jni_jpegstream/;ls
Android.mk0  src

同样将其改为mk文件
avatarmind@ubuntu:/work/android-4.4/packages/apps/Gallery2/jni_jpegstream$ mv Android.mk0 Android.mk
avatarmind@ubuntu:/work/android-4.4/packages/apps/Gallery2/jni_jpegstream$ ls
Android.mk  src

退回/work/android-4.4/ 编译
avatarmind@ubuntu:/work/android-4.4/packages/apps/Gallery2/jni_jpegstream$ croot
avatarmind@ubuntu:/work/android-4.4$ make Gallery2 -j8






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值