第一个问题,提示 Error-Expected resource of type styleable [ResourceType] . ps:因为我用了沉浸式状态栏技术,在做的时候用到了一个工具类: SystemBarTintManager 
通过百度找到解决方案:http://blog.csdn.net/mynameishuangshuai/article/details/51799410 在方法顶上,或者类名顶上加上这句代码.
@SuppressWarnings("ResourceType")public SystemBarTintManager(Activity activity) {            ……}

第二个问题,编译后运行项目时在logcat报出找不到 GlideModule还是它有问题什么的,于是我又百度了,然后找到这里有混淆规则:http://blog.csdn.net/qq_19711823/article/details/51243918 按照上面的混淆规则加入到规则文件.
-keep public class * implements com.bumptech.glide.module.GlideModule

第三个问题 Warning:Exception while processing task java.io.IOException: The same input jar […….jar] is specified twice.

意思就是声明了相同的jar包的意思吧. 百度到:http://blog.csdn.net/ylbf_dev/article/details/50448727 解决方式: 打开混淆规则文件,proguard-project.txt 或者proguard-rules.pro 或者 proguard.cfg  
在所有的-libraryjars 前插入 # 成 #-libraryjars xxxx.jar

第四个问题:
Warning:uk.co.senab.photoview.PhotoViewAttacher: can't find referenced metho...
项目中使用的这个PhotoView报警了. 百度到的:http://stackoverflow.com/questions/32118655/you-need-to-use-a-theme-appcompat-theme-with-theme-appcompat-as-theme-sdk-v23 解决方式,根据答主的方法在混淆文件中添加:
-dontwarn uk.co.senab.photoview.**

第五个问题:
warning: Ignoring InnerClasses attribute for an anonymous inner class...


编译时报了警告,但是签名包还是打出来了.而且用的时候也没事.就是看着不爽.


解决方式:

百度到的方法: http://blog.csdn.net/IDrinkMoreWater/article/details/46679787

1.在混淆规则文件proguard-project.txt(貌似正常的as工程是proguard-rules.pro)中添加一句

-keepattributes EnclosingMethod
2.在项目的 module的build.gradle文件(注意别搞错 build.gradle文件)中: 
buildTypes {    debug {        debuggable true        jniDebuggable true        zipAlignEnabled true        minifyEnabled false        shrinkResources false        signingConfig signingConfigs.debug //这句我加入后有问题,我把它去了,只添加上面     }    release {        debuggable false        jniDebuggable false        zipAlignEnabled true        minifyEnabled true        shrinkResources true        signingConfig signingConfigs.release //这句我加入后有问题,我把它去了,只添加上面的        proguardFiles getDefaultProguardFile('proguard-       android.txt'), 'proguard-rules.pro'    }}

第六个问题:AndFix报警.这个没法截图说明.

在原先的eclipse项目中使用了热修复框架AndFix,当时做的是工程依赖而不是jar依赖的形式(ps:因为andFix中有C代码无法打包成jar依赖),所以转到as这边也给我转的是module依赖的形式.

后来报错说是找不到里面的某个类.机智如我果断删除AndFix的module,去掉依赖后我直接上github去官方andfix拿到使用它的标准依赖方式.


以上问题无法分清先后发生,博主都是把问题都解决完才整理的.希望能有帮助.



更多相关文章

  1. 揭秘uc浏览器三
  2. android 上傳圖片的幾種方法
  3. ButterKnife的用法。针对android studio3.6.1 ButterKnife10.0.0
  4. Android多语言切换,字体风格,简体转繁体
  5. 1.2android——UI界面之ScrollView实现上下文滚动
  6. Android(安卓)libmp3lame详解
  7. 如何从一个activity启动另外一个activity Android(安卓)Eclipse
  8. Android使用wheelView实现简单类似ios PickerView选择器效果
  9. Android(安卓)国际化和屏幕适配

随机推荐

  1. Android Wifi:使用Android Instrument 自
  2. Android Studio环境变量设置
  3. 使用getevent监听Android输入设备文件
  4. android SlidingMenu 侧边菜单划出后剩余
  5. Android菜鸟日记31-selector 中使用 shap
  6. Android开发自学笔记(Android(安卓)Studi
  7. android 工程 日志输出 附源码
  8. 自制android1.5的源码包
  9. 我的hosts文件
  10. Mac下的android studio快捷键