android studio 打包,过时警告的问题

移动开发 码拜 7年前 (2017-04-14) 4075次浏览
今天公司打码进行了一些合并,打包时候遇到的如下错误
Error:(71, 34) 警告: [deprecation] CookieManager中的removeSessionCookie()已过时
Error:(53, 37) 警告: [deprecation] org.apache.http中的Header已过时
Error:(55, 6) 警告: [deprecation] Builder中的cacheOnDisc(boolean)已过时
Error:(101, 36) 警告: [deprecation] CookieManager中的removeSessionCookie()已过时
Error:(51, 34) 警告: [deprecation] org.apache.http.impl.cookie中的BasicClientCookie已过时
Error:(60, 35) 警告: [unchecked] 对作为原始类型Class的成员的getDeclaredMethod(String,Class<?>…)的调用未经过检查
Error:(197, 37) 警告: [deprecation] org.apache.http中的Header已过时
Error:(18, 23) 警告: [deprecation] org.apache.http中的Header已过时
Error:(130, 7) 警告: [deprecation] Options中的inPurgeable已过时
Error:(34, 171) 警告: [deprecation] Builder中的cacheOnDisc(boolean)已过时
Error:(137, 26) 警告: [deprecation] ClipboardManager中的getText()已过时
Error:(105, 23) 警告: [deprecation] ViewPager中的setOnPageChangeListener(OnPageChangeListener)已过时
Error:(178, 37) 警告: [deprecation] org.apache.http中的Header已过时
Error:(172, 16) 警告: [deprecation] Notification中的icon已过时
Error:(56, 17) 警告: [deprecation] PagerAdapter中的destroyItem(View,int,Object)已过时
Error:(37, 19) 警告: [deprecation] PagerAdapter中的instantiateItem(View,int)已过时
Error:(129, 7) 警告: [deprecation] Options中的inInputShareable已过时
Error:(6, 35) 警告: [deprecation] org.apache.http.impl.cookie中的BasicClientCookie已过时
Error:(71, 37) 警告: [deprecation] org.apache.http中的Header已过时
Error:(45, 6) 警告: [deprecation] Builder中的discCacheFileNameGenerator(FileNameGenerator)已过时
Error:(131, 37) 警告: [deprecation] org.apache.http中的Header已过时
Error:(51, 6) 警告: [deprecation] org.apache.http.impl.cookie中的BasicClientCookie已过时
Error:(196, 42) 警告: [deprecation] Resources中的getColor(int)已过时
Error:(55, 23) 警告: [deprecation] SDEventManager中的post(int)已过时
Error:(112, 37) 警告: [deprecation] org.apache.http中的Header已过时
Error:(156, 10) 警告: [deprecation] Options中的inPurgeable已过时
Error:(157, 10) 警告: [deprecation] Options中的inInputShareable已过时
Error:(179, 56) 警告: [unchecked] 对作为原始类型Class的成员的getMethod(String,Class<?>…)的调用未经过检查
解决方案

10

阿帕奇在android5.0之后就不推荐    6.0之后就不支持了,建议用Volley框架代替你原来框架的网络请求方法
可以看看本人的一篇博客
http://blog.csdn.net/stanny_bing/article/details/52680363

60

在build.gradle中添加如下配置试试:

lintOptions {
        abortOnError false
    }

意思是不进行lint检查


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明android studio 打包,过时警告的问题
喜欢 (0)
[1034331897@qq.com]
分享 (0)