说说今天打包遇到的坑,由于线上有个支付的bug需要紧急修复,而我们的项目又没有使用热修复,所以只能通过编译打包等传统流程,还好android上线比较快。

说说我进早上打包遇到的几个问题吧,首先我使用build-->generate signed apk然后输入签名打包,啪,给我报了一个错。

1,debug-stripped.ap_' specified for property 'resourceFile' does not exist.

这什么错,怎么一起没遇到过,马上度娘,找了半天找到一个和我很相似的,意思是android studio升级到2.2之后出现的错误,于是我也尝试了一把下面的方法:

File—>Settings,打开Settings界面,搜索到Instant Run。

,2怎么我的默认就是没选中的啊,于是看第二条,有人说是Debug模式下的混淆开关问题。

好我都把你改了,debug我都false行了吧,形如:

buildTypes {
    release {
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    debug {
        minifyEnabled false
        shrinkResources false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

3,我又重新编译,结果报Android Studio 混淆打包 IOException: Please correct the above warnings first,形如下面的错误

Warning:org.apache.http.impl.conn.tsccm.RouteSpecificPool: can't find referenced class org.apache.commons.logging.LogFactory
Warning:org.apache.http.impl.conn.tsccm.RouteSpecificPool: can't find referenced class org.apache.commons.logging.Log
Warning:org.apache.http.impl.conn.tsccm.RouteSpecificPool: can't find referenced class org.apache.commons.logging.LogFactory
Warning:org.apache.http.impl.conn.tsccm.RouteSpecificPool: can't find referenced class org.apache.commons.logging.Log
Warning:org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager: can't find referenced class org.apache.commons.logging.LogFactory
Warning:org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager: can't find referenced class org.apache.commons.logging.Log
Warning:org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager: can't find referenced class org.apache.commons.logging.LogFactory
Warning:org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager: can't find referenced class org.apache.commons.logging.Log
Warning:org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager$1: can't find referenced class org.apache.commons.logging.Log
Warning:there were 210 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)
Warning:there were 1 unresolved references to library class members.
         You probably need to update the library versions.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)
:app:proguardRelease FAILED
Error:Execution failed for task ':app:proguardRelease'.
> java.io.IOException: Please correct the above warnings first.  

好吧,我打开混淆文件(proguard-rules),首先我看到有人把下面的ignorewarning注释了,我擦,然后关闭,打包成功,不过这里加上下面的一段话

打包报错java.io.IOException: Please correct the above warnings first.
-dontwarn org.apache.http.**

Android打包遇到的那些坑的更多相关文章

  1. [Android Pro] Android打包一个Apk后,如何查看它的VersionCode、VersionName 等等。

    Android打包成Apk后,其实是一个压缩文件,我们用winrar打开也能看到里面的文件结构.还能看到AndroidManifest.但是里面的内容有点问题. 不知道是因为加密还是Android就是 ...

  2. Android打包的那些事

    使用gradle打包apk已经成为当前主流趋势,我也在这个过程中经历了各种需求,并不断结合gradle新的支持,一一改进.在此,把这些相关的东西记录,做一总结. 1. 替换AndroidManifes ...

  3. [Android Pro] Android 打包流程

    Android 打包流程: 官网地址:http://developer.android.com/tools/building/index.html 具体的打包步骤如下: 1:生成R.java类文件:E ...

  4. 【No.2 Ionic】Android打包

    项目做完之后 接下来就是打包操作了,接下来直接说Android 打包操作 生成签名证书 keytool -genkey -alias vincentguo -keyalg RSA -validity  ...

  5. Android开发需要注意的坑

    Android开发需要注意的坑一览​对于一些Android开发过程中坑爹.细小,但又重要的错误的总结​Android开发在路上:少去踩坑,多走捷径其他参考: ​google官方版本发布图 ​umeng ...

  6. android打包apk时混淆遇到的问题

    android打包apk的时候一般会选择混淆,而在eclipse中常使用的是proguard来混淆.有很多时候引用了第三方包的时候会导致打包不成功,或者打包成功不能运行的情况. 首先看看正常的prog ...

  7. react-native android打包签名release版apk遇到的问题

    在该项目包名时遇到的一个android打包问题,如下 改包名步骤 修改android/app/build.gradle里的applicationId,为新包名,如:com.xxx.yyy.myProj ...

  8. RN在Android打包发布App

    参考资料:http://www.jianshu.com/p/b8811669bcb6 RN在Android打包发布App 1-:生成一个签名密钥你可以用keytool命令生成一个私有密钥.在Windo ...

  9. Android打包 & Gradle用法

    Ref: Maven仓库上查插件最新版本号The Central Repository Search Enginehttp://search.maven.org/#search%7Cga%7C1%7C ...

随机推荐

  1. [HNOI2015]落忆枫音

    题目描述 「恒逸,你相信灵魂的存在吗?」 郭恒逸和姚枫茜漫步在枫音乡的街道上.望着漫天飞舞的红枫,枫茜突然问出这样一个问题. 「相信吧.不然我们是什么,一团肉吗?要不是有灵魂......我们也不可能再 ...

  2. UVA11795 Mega Man's Mission

    状压dp #include<cstdio> #include<cstdlib> #include<algorithm> #include<cstring> ...

  3. ●BOZJ 1927 [Sdoi2010]星际竞速

    题链: http://www.lydsy.com/JudgeOnline/problem.php?id=1927 题解: 显然是个DAG 建图和有向图最小路径覆盖的建图有些相似. 都是拆点为 u u' ...

  4. bzoj3786星系探索 splay

    3786: 星系探索 Time Limit: 40 Sec  Memory Limit: 256 MBSubmit: 1314  Solved: 425[Submit][Status][Discuss ...

  5. [bzoj4236]JOIOJI

    来自FallDream的博客,未经允许,请勿转载,谢谢. JOIOJI桑是JOI君的叔叔.“JOIOJI”这个名字是由“J.O.I”三个字母各两个构成的. 最近,JOIOJI桑有了一个孩子.JOIOJ ...

  6. bzoj1934

    1934: [Shoi2007]Vote 善意的投票 Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 2406  Solved: 1498[Submit][ ...

  7. 对I/O设备分配的一般策略是什么?

    策略是:独享分配.共享分配.虚拟分配 补充:I/O设备的分配算法 1.  先请求先服务 2.  优先级最高者优先

  8. Linux下实现普通用户免密码登录【超详细】

    现有需求,需要把所有服务器的root和密码登录都禁用,只开放普通用户登录,这时需要给普通用户配置秘钥文件,实现无密码登录 如果普通用户需要root权限,在root用户下执行命令:visudo [roo ...

  9. VC++ 6.0中添加库文件和头文件

    附加头文件包含 VC6.0中: VC6.0默认include包含路径:Tools>Options>Directories>Include files. 对于特定项目的头文件包含,在& ...

  10. a++与 ++a

    a++先执行表达式再自增执行表达式使用a原值++a先自增再执行表达示执行表达式使用自增a例:int a=0printf("%d",a++); //输0,执行完a=1int a=0p ...