Android mk编译OkHttp3
来源:互联网 发布:上网流量统计软件 编辑:程序博客网 时间:2024/05/21 08:47
使用OkHttp,放到framework层编译,编译错误:
Warning: okio.DeflaterSink: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirementWarning: okio.Okio: can't find referenced class java.nio.file.FilesWarning: okio.Okio: can't find referenced class java.nio.file.FilesWarning: okio.Okio: can't find referenced class java.nio.file.FilesWarning: okio.Okio: can't find referenced class java.nio.file.PathWarning: okio.Okio: can't find referenced class java.nio.file.OpenOptionWarning: okio.Okio: can't find referenced class java.nio.file.PathWarning: okio.Okio: can't find referenced class java.nio.file.OpenOptionWarning: okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirementWarning: okio.Okio: can't find referenced class java.nio.file.PathWarning: okio.Okio: can't find referenced class java.nio.file.OpenOptionWarning: okio.Okio: can't find referenced class java.nio.file.PathWarning: okio.Okio: can't find referenced class java.nio.file.OpenOptionWarning: okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirementWarning: there were 14 unresolved references to classes or interfaces. You may need to add missing library jars or update their versions. If your code works fine without the missing classes, you can suppress the warnings with '-dontwarn' options. (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)Error: Please correct the above warnings first.
编译环境:
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.16.0-40-generic x86_64)
miyuehu@ubuntu:~$ java -version
- java version “1.7.0_101”
- OpenJDK Runtime Environment (IcedTea 2.6.6) (7u101-2.6.6-0ubuntu0.14.04.1)
- OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
github okhttp FAQs
https://github.com/square/okhttp/issues/964
大牛回复
Nope. They are safe to ignore!
擦,不用管。
关键提示信息:“the warnings with ‘-dontwarn’ options”
////////////////////////////////////////////////////////////////
修改Android.mk
###使能proguard.cfgLOCAL_PROGUARD_ENABLED := fullLOCAL_PROGUARD_FLAG_FILES := proguard.cfgLOCAL_CERTIFICATE := platforminclude $(BUILD_PACKAGE)include $(CLEAR_VARS)LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := okhttp:libs/okhttp-3.5.0.jar LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES += okio:libs/okio-1.11.0.jarinclude $(BUILD_MULTI_PREBUILT)
修改proguard.cfg
-dontwarn okio.**
目录结构:
.
├── AndroidManifest.xml
├── Android.mk
├── assets
├── libs
│?? ├── okhttp-3.5.0.jar
│?? └── okio-1.11.0.jar
0 0
- Android mk编译OkHttp3
- Android.mk编译apk
- Android.mk编译控制
- android mk编译错误
- 编译android.mk
- Android 编译系统 android.mk
- android编译系统 - pathmap.mk
- Android.mk编译APK范例
- android编译系统 - pathmap.mk
- Android.mk编译APK范例
- Android.mk编译APK范例
- Android.mk编译APK范例
- android编译之mk脚本
- Android.mk编译APK范例
- Android.mk编译APK范例
- Android.mk编译APK范例
- Android.mk编译生成APK
- Android .mk 编译 APK 范例
- Hadoop的jobhistoryserver配置
- Linux下安装MySQL
- java2 day03 XML DOM4J
- 搭建python的eclipse开发环境并创建简单的python程序
- ubuntu 16.04+最新caffe安装
- Android mk编译OkHttp3
- 蓝桥杯——数组、函数问题典例一(2017.1.17)
- java之数据转换(Java与json以及map和list的解析)
- svn 过滤词
- VM中添加磁盘
- mysql通过解压配置文件安装方法
- 史上最全财会人职业发展与考证指南
- 判断一个整数是否为回文数
- 直角三角形的判断