Warning: okio.DeflaterSink: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: okio.Okio: can't find referenced class java.nio.file.Files
Warning: okio.Okio: can't find referenced class java.nio.file.Files
Warning: okio.Okio: can't find referenced class java.nio.file.Files
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: 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.
make: *** [out/target/common/obj/APPS/AndroidOkGo_intermediates/proguard.classes.jar] Error 1
1.设置:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-v4 \
okhttp-3.4.1 \
okio-1.9.0 \
#LOCAL_JNI_SHARED_LIBRARIES := libamapv304 libamapv304ex libtbt libwtbt
LOCAL_SRC_FILES := $(call all-java-files-under, src)
#1.解决jar中不能被引用start
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
#1.解决jar中不能被引用end
#2.解决jar中不能被引用start
#和android.mk同目录下,添加文件proguard.cfg,文件内容:(即后面跟随包名,是的只有一行)
#-dontwarn okio.**
#2.解决jar中不能被引用end
LOCAL_CERTIFICATE := platform
LOCAL_PACKAGE_NAME := AndroidOkGo
include $(BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
okhttp-3.4.1:libs/okhttp-3.4.1.jar \
okio-1.9.0:libs/okio-1.9.0.jar \
include $(BUILD_MULTI_PREBUILT)
2.mk编译文件不能识别网络lib库
Android.mk文件中添加:
LOCAL_JAVA_LIBRARIES += org.apache.http.legacy