- 浏览: 2216303 次
- 性别:
- 来自: 北京
-
文章分类
- 全部博客 (1240)
- mac/IOS (287)
- flutter (1)
- J2EE (115)
- android基础知识 (582)
- android中级知识 (55)
- android组件(Widget)开发 (18)
- android 错误 (21)
- javascript (18)
- linux (70)
- 树莓派 (18)
- gwt/gxt (1)
- 工具(IDE)/包(jar) (18)
- web前端 (17)
- java 算法 (8)
- 其它 (5)
- chrome (7)
- 数据库 (8)
- 经济/金融 (0)
- english (2)
- HTML5 (7)
- 网络安全 (14)
- 设计欣赏/设计窗 (8)
- 汇编/C (8)
- 工具类 (4)
- 游戏 (5)
- 开发频道 (5)
- Android OpenGL (1)
- 科学 (4)
- 运维 (0)
- 好东西 (6)
- 美食 (1)
最新评论
-
liangzai_cool:
请教一下,文中,shell、C、Python三种方式控制led ...
树莓派 - MAX7219 -
jiazimo:
...
Kafka源码分析-序列5 -Producer -RecordAccumulator队列分析 -
hp321:
Windows该命令是不是需要安装什么软件才可以?我试过不行( ...
ImageIO读jpg的时候出现javax.imageio.IIOException: Unsupported Image Type -
hp321:
Chenzh_758 写道其实直接用一下代码就可以解决了:JP ...
ImageIO读jpg的时候出现javax.imageio.IIOException: Unsupported Image Type -
huanghonhpeng:
大哥你真强什么都会,研究研究。。。。小弟在这里学到了很多知识。 ...
android 浏览器
在Eclipse打包工程时报如下错误:
[2014-01-06 08:58:44 - emp_android] Proguard returned with error code 1. See console
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.b$a: can't find superclass or interface android.location.GpsStatus$NmeaListener
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced method 'int getLac()' in class android.telephony.NeighboringCellInfo
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.e: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.e: can't find referenced method 'void onSignalStrengthsChanged(android.telephony.SignalStrength)' in class android.telephony.PhoneStateListener
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.e: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.e: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.i: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.i: can't find referenced method 'void onSignalStrengthsChanged(android.telephony.SignalStrength)' in class android.telephony.PhoneStateListener
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.i: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.i: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.b: can't find referenced method 'boolean addNmeaListener(android.location.GpsStatus$NmeaListener)' in class android.location.LocationManager
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.b: can't find referenced method 'void removeNmeaListener(android.location.GpsStatus$NmeaListener)' in class android.location.LocationManager
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.b: can't find referenced class android.location.GpsStatus$NmeaListener
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.b$a: can't find referenced class android.location.GpsStatus$NmeaListener
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.c: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.c$a: can't find referenced method 'int getLac()' in class android.telephony.NeighboringCellInfo
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.c$b: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.c$b: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.c$b: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.c$b: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.lakala.b.b$2: can't find referenced method 'boolean isWiredHeadsetOn()' in class android.media.AudioManager
[2014-01-06 08:58:44 - emp_android] Warning: com.lingtu.mapapi.MapView: can't find referenced method 'int getPointerCount()' in class android.view.MotionEvent
[2014-01-06 08:58:44 - emp_android] You should check if you need to specify additional program jars.
[2014-01-06 08:58:44 - emp_android] Warning: there were 20 unresolved references to classes or interfaces.
[2014-01-06 08:58:44 - emp_android] You may need to specify additional library jars (using '-libraryjars').
[2014-01-06 08:58:44 - emp_android] Warning: there were 8 unresolved references to program class members.
[2014-01-06 08:58:44 - emp_android] Your input classes appear to be inconsistent.
[2014-01-06 08:58:44 - emp_android] You may need to recompile them and try again.
[2014-01-06 08:58:44 - emp_android] Alternatively, you may have to specify the option
[2014-01-06 08:58:44 - emp_android] '-dontskipnonpubliclibraryclassmembers'.
[2014-01-06 08:58:44 - emp_android] java.io.IOException: Please correct the above warnings first.
[2014-01-06 08:58:44 - emp_android]at proguard.Initializer.execute(Initializer.java:321)
[2014-01-06 08:58:44 - emp_android]at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-01-06 08:58:44 - emp_android]at proguard.ProGuard.execute(ProGuard.java:86)
[2014-01-06 08:58:44 - emp_android]at proguard.ProGuard.main(ProGuard.java:492)
大体意思是找不到相关的类或者方法,因为工程引入了第三方包,混淆的时候如果把第三方包也混淆了,那么相关的类在使用这些包的时候就会找不到相关方法。
因此在proguard.cfg加上以下代码:
其实找不到引用的这个类是第三方包里面的,而且很多时候我们只需要打乱自己的代码就行了,第三方包的代码就是否要打乱就不要管了。我们可以使用
-dontwarn com.xx.bbb.**
-keep class com.xx.bbb.** { *;}
参数来保持第三方库中的类而不乱,-dontwarn和-keep 结合使用,意思是保持com.xx.bbb.**这个包里面的所有类和所有方法而不混淆,接着还叫ProGuard不要警告找不到com.xx.bbb.**这个包里面的类的相关引用。
配置好后,重新打包,一切OK!而且程序能正确运行
[2014-01-06 08:58:44 - emp_android] Proguard returned with error code 1. See console
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.b$a: can't find superclass or interface android.location.GpsStatus$NmeaListener
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced method 'int getLac()' in class android.telephony.NeighboringCellInfo
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.APS: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.e: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.e: can't find referenced method 'void onSignalStrengthsChanged(android.telephony.SignalStrength)' in class android.telephony.PhoneStateListener
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.e: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.e: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.i: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.i: can't find referenced method 'void onSignalStrengthsChanged(android.telephony.SignalStrength)' in class android.telephony.PhoneStateListener
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.i: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.autonavi.aps.api.i: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.b: can't find referenced method 'boolean addNmeaListener(android.location.GpsStatus$NmeaListener)' in class android.location.LocationManager
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.b: can't find referenced method 'void removeNmeaListener(android.location.GpsStatus$NmeaListener)' in class android.location.LocationManager
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.b: can't find referenced class android.location.GpsStatus$NmeaListener
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.b$a: can't find referenced class android.location.GpsStatus$NmeaListener
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.c: can't find referenced class android.telephony.cdma.CdmaCellLocation
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.c$a: can't find referenced method 'int getLac()' in class android.telephony.NeighboringCellInfo
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.c$b: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.c$b: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.c$b: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.baidu.location.c$b: can't find referenced class android.telephony.SignalStrength
[2014-01-06 08:58:44 - emp_android] Warning: com.lakala.b.b$2: can't find referenced method 'boolean isWiredHeadsetOn()' in class android.media.AudioManager
[2014-01-06 08:58:44 - emp_android] Warning: com.lingtu.mapapi.MapView: can't find referenced method 'int getPointerCount()' in class android.view.MotionEvent
[2014-01-06 08:58:44 - emp_android] You should check if you need to specify additional program jars.
[2014-01-06 08:58:44 - emp_android] Warning: there were 20 unresolved references to classes or interfaces.
[2014-01-06 08:58:44 - emp_android] You may need to specify additional library jars (using '-libraryjars').
[2014-01-06 08:58:44 - emp_android] Warning: there were 8 unresolved references to program class members.
[2014-01-06 08:58:44 - emp_android] Your input classes appear to be inconsistent.
[2014-01-06 08:58:44 - emp_android] You may need to recompile them and try again.
[2014-01-06 08:58:44 - emp_android] Alternatively, you may have to specify the option
[2014-01-06 08:58:44 - emp_android] '-dontskipnonpubliclibraryclassmembers'.
[2014-01-06 08:58:44 - emp_android] java.io.IOException: Please correct the above warnings first.
[2014-01-06 08:58:44 - emp_android]at proguard.Initializer.execute(Initializer.java:321)
[2014-01-06 08:58:44 - emp_android]at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-01-06 08:58:44 - emp_android]at proguard.ProGuard.execute(ProGuard.java:86)
[2014-01-06 08:58:44 - emp_android]at proguard.ProGuard.main(ProGuard.java:492)
大体意思是找不到相关的类或者方法,因为工程引入了第三方包,混淆的时候如果把第三方包也混淆了,那么相关的类在使用这些包的时候就会找不到相关方法。
因此在proguard.cfg加上以下代码:
-dontwarn com.baidu.** -keep class com.baidu.** { *;} -dontwarn com.lakala.** -keep class com.lakala.** { *;} -dontwarn com.lingtu.** -keep class com.lingtu.** { *;} -dontwarn com.autonavi.** -keep class com.autonavi.** { *;}
其实找不到引用的这个类是第三方包里面的,而且很多时候我们只需要打乱自己的代码就行了,第三方包的代码就是否要打乱就不要管了。我们可以使用
-dontwarn com.xx.bbb.**
-keep class com.xx.bbb.** { *;}
参数来保持第三方库中的类而不乱,-dontwarn和-keep 结合使用,意思是保持com.xx.bbb.**这个包里面的所有类和所有方法而不混淆,接着还叫ProGuard不要警告找不到com.xx.bbb.**这个包里面的类的相关引用。
配置好后,重新打包,一切OK!而且程序能正确运行
发表评论
-
带你深入理解 FLUTTER 中的字体“冷”知识
2020-08-10 23:40 656本篇将带你深入理解 Flutter 开发过程中关于字体和文 ... -
Flutter -自定义日历组件
2020-03-01 17:56 1133颜色文件和屏幕适配的文件 可以自己给定 import ... -
Dart高级(一)——泛型与Json To Bean
2020-02-23 19:13 1024从 Flutter 发布到现在, 越来越多人开始尝试使用 Da ... -
flutter loading、Progress进度条
2020-02-21 17:03 1201Flutter Progress 1 条形无固定值进度条 ... -
Flutter使用Https加载图片
2020-02-21 01:39 1045Flutter使用Https加载图片 使用http加载图片出 ... -
flutter shared_preferences 异步变同步
2020-02-21 00:55 864前言 引用 在开发原生iOS或Native应用时,一般有判断上 ... -
Flutter TextField边框颜色
2020-02-19 21:31 956监听要销毁 myController.dispose(); T ... -
flutter Future的正确用法
2020-02-18 21:55 816在flutter中经常会用到异步任务,dart中异步任务异步处 ... -
记一次Flutter简单粗暴处理HTTPS证书检验方法
2020-02-18 14:13 1008最近在做Flutter项目到了遇到一个无解的事情,当使用Ima ... -
flutter 获取屏幕宽度高度 通知栏高度等屏幕信息
2019-07-27 08:39 1369##MediaQuery MediaQuery.of(con ... -
关于flutter RefreshIndicator扩展listview下拉刷新的问题
2019-07-10 19:40 1158当条目过少时listview某些嵌套情况下可能不会滚动(条目 ... -
flutter listview 改变状态的时候一直无限添加
2019-07-10 16:01 817setstate的时候会一直无限的调用listview.bui ... -
Flutter Android端启动白屏问题的解决
2019-07-09 00:51 1548问题描述 Flutter 应用在 Android 端上启动时 ... -
Flutter中SnackBar使用
2019-07-08 23:43 800底部弹出,然后在指定时间后消失。 注意: build(Bui ... -
Flutter 之点击空白区域收起键盘
2019-07-08 18:43 1806点击空白处取消TextField焦点这个需求是非常简单的,在学 ... -
Flutter 弹窗 Dialog ,AlertDialog,IOS风格
2019-07-08 18:04 1403import 'package:flutter/mate ... -
flutter ---TextField 之 输入类型、长度限制
2019-07-08 14:30 2362TextField想要实现输入类型、长度限制需要先引入impo ... -
【flutter 溢出BUG】键盘上显示bottom overflowed by 104 PIXELS
2019-07-08 11:13 1601一开始直接使用Scaffold布局,body:new Colu ... -
解决Flutter项目卡在Initializing gradle...界面的问题
2019-07-07 12:53 907Flutter最近很火,我抽出了一点时间对Flutter进行了 ... -
关于android O 上 NotificationChannel 的一些注意事项
2019-07-04 11:47 954最近在适配android O,遇到个问题,应用中原本有设置界面 ...
相关推荐
marlett_01_0109
AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
stassar_3cd_01_0716
malpass_02_0907
AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
matlab程序代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
matlab程序代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
matsumoto_01_1107
AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
代码
大模型创业者手册-法务与产品合规篇.pdf
AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
指标体系数据开发
半导体三极管β值测量仪的设计与制作
AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!
本文将带你深入了解如何使用OpenCV库实现图片拼接技术,打造令人惊叹的全景图像。通过清晰的步骤讲解和代码示例
nicholl_01_0508
lim_3ck_04_0719
DeepSeek入门宝典-个人使用篇.pdf