Eclipse打包Android项目时用到proguard.cfg后,出现的Warning:can't find referenced class问题的解决方式

Warning: can‘t find superclass or interface

Warning: can‘t find referenced class

这两个问题的解决方法:

1.要把你项目中所引入的第三方jar包使用"-libraryjars 包路径"指定好。

2.还是报错的话,确保报错的类没有在你的项目中使用到,使用"-dontwarn 类名正則表達式"屏蔽警告。

完了?但是我还想问:第一步做完后还是报错,并且这个类在我项目中真的实用到,不能使用"-dontwarn .."屏蔽警告啊??

解决方式了:

事实上找不到引用的这个类是第三方包里面的,并且非常多时候我们仅仅须要打乱自己的代码即可了,第三方包的代码就是否要打乱就不要管了。嘻嘻,这叫做"仅仅扫自己门前雪。甭管他人瓦上霜"。

我们能够使用

-dontwarn com.xx.bbb.**

-keep class com.xx.bbb.** { *;}

參数来保持第三方库中的类而不乱,-dontwarn和-keep 结合使用,意思是保持com.xx.bbb.**这个包里面的全部类和全部方法而不混淆,接着还叫ProGuard不要警告找不到com.xx.bbb.**这个包里面的类的相关引用。

配置好后。又一次打包,一切OK!并且程序能正确执行

Eclipse打包Android项目时用到proguard.cfg后,出现的Warning:can't find referenced class问题的解决方式

时间: 2024-08-05 21:50:26

Eclipse打包Android项目时用到proguard.cfg后,出现的Warning:can't find referenced class问题的解决方式的相关文章

Eclipse编译Android项目时出现的问题:Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead.

Consle: Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead. Please use Android Tools > Fix Project Properties. 然而,按照提示的方法,右键项目->Android Tools->Fix Project Properties时,发现并没有卵用... 我的解决方式是: 右键项目->Properties,把 JavaCompiler

关于Eclipse创建Android项目时,会多出一个appcompat_v7的问题

问题描述: 使用eclipse创建一个Android项目时,发现project列表中会多创建出一个appcompat_v7项目,再创建一个Android项目时,又会再多出一个appcompat_v7_2,如果再次创建,会以此类推地创建出appcompat_v7_x格式的“多余项目”出来(此情况在ADT升级为22.6.x版本后出现,22.3.x前的版本不会有) 查明原因: ADT在22.3.x版本前没有出现该情况,升级为22.6.x版本后,才出现该情况,可以猜测是新版本导致.猜测到原因后可以分析下

关于Eclipse创建Android项目时,会多出一个appcompat_v7的问题【转】

转自:http://blog.csdn.net/crazykbc/article/details/21553699 问题描述: 使用eclipse创建一个Android项目时,发现project列表中会多创建出一个appcompat_v7项目,再创建一个Android项目时,又会再多出一个appcompat_v7_2,如果再次创建,会以此类推地创建出appcompat_v7_x格式的“多余项目”出来(此情况在ADT升级为22.6.x版本后出现,22.3.x前的版本不会有) 查明原因: ADT在2

eclipse新建Android项目时提示AndroidManifest.xml file missing!

最近做一个小的项目时发现刚新建了一个项目失败了,控制台就输出AndroidManifest.xml file missing! 是么R文件都没有.原来是项目名称不能带中文,用英文的就OK了.

eclipse 新建 android 项目时,问题汇总

eclipse.buildId=4.4.0.I20140606-1215java.version=1.8.0_11java.vendor=Oracle CorporationBootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CNFramework arguments: -product org.eclipse.epp.package.jee.productCommand-line arguments: -os win32 -ws

eclipse创建android项目无法正常预览布局文件

eclipse创建android项目时,预览layout.xml文件时提示: This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in,导致无法正常预览布局文件.问题根源:SDK版本过高,ADT版本过低.解决方法如下. 工具/原料 eclipse ADT插件 方法/步骤 1 找到eclipse文件夹,打开eclipse软件,创建a

eclipse创建android项目,无法正常预览布局文件,出现This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in...

eclipse创建android项目时,预览layout.xml文件时提示: This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in,导致无法正常预览布局文件.问题根源:SDK版本过高,ADT版本过低.解决方法如下. 工具/原料 eclipse ADT插件 方法/步骤 找到eclipse文件夹,打开eclipse软件,创建and

Android开发中遇到的问题(三)——eclipse创建android项目无法正常预览布局文件

一.问题描述 今天使用SDK Manager将Android SDK的版本更新到了Android 5.1的版本,eclipse创建android项目时,预览activity_main.xml文件时提示: This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in,导致无法正常预览布局文件,现象如下图所示: 上网查了一下原因,问题根源

eclipse创建android项目,无法正常预览布局文件的相关问题

eclipse创建android项目时,预览layout.xml文件时提示: This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in,导致无法正常预览布局文件. 问题的根源在于SDK版本与ADT版本不匹配.问题解决办法如下: 方法一: 找到选择android版本按钮,改变android版本即可.如下图: 方法二: Help --