Android studio 混淆代码 -问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

Android studio 混淆代码

2016-05-30 10:35:33 3894 1

混淆代码直接报

 Information:Gradle tasks [:app:assembleRelease]
 :MyLibray:compileLint
 :MyLibray:copyReleaseLint UP-TO-DATE
 :MyLibray:preBuild UP-TO-DATE
 :MyLibray:preReleaseBuild UP-TO-DATE
 :MyLibray:checkReleaseManifest
 :MyLibray:preDebugAndroidTestBuild UP-TO-DATE
 :MyLibray:preDebugBuild UP-TO-DATE
 :MyLibray:preDebugUnitTestBuild UP-TO-DATE
 :MyLibray:preReleaseUnitTestBuild UP-TO-DATE
 :MyLibray:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
 :MyLibray:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
 :MyLibray:prepareReleaseDependencies
 :MyLibray:compileReleaseAidl UP-TO-DATE
 :MyLibray:compileReleaseRenderscript UP-TO-DATE
 :MyLibray:generateReleaseBuildConfig UP-TO-DATE
 :MyLibray:generateReleaseAssets UP-TO-DATE
 :MyLibray:mergeReleaseAssets UP-TO-DATE
 :MyLibray:generateReleaseResValues UP-TO-DATE
 :MyLibray:generateReleaseResources UP-TO-DATE
 :MyLibray:mergeReleaseResources UP-TO-DATE
 :MyLibray:processReleaseManifest UP-TO-DATE
 :MyLibray:processReleaseResources UP-TO-DATE
 :MyLibray:generateReleaseSources UP-TO-DATE
 :MyLibray:processReleaseJavaRes UP-TO-DATE
 :MyLibray:compileReleaseJavaWithJavac UP-TO-DATE
 :MyLibray:extractReleaseAnnotations UP-TO-DATE
 :MyLibray:mergeReleaseProguardFiles UP-TO-DATE
 :MyLibray:packageReleaseJar UP-TO-DATE
 :MyLibray:compileReleaseNdk UP-TO-DATE
 :MyLibray:packageReleaseJniLibs UP-TO-DATE
 :MyLibray:packageReleaseLocalJar UP-TO-DATE
 :MyLibray:packageReleaseRenderscript UP-TO-DATE
 :MyLibray:packageReleaseResources UP-TO-DATE
 :MyLibray:bundleRelease UP-TO-DATE
 :app:preBuild UP-TO-DATE
 :app:preReleaseBuild UP-TO-DATE
 :app:checkReleaseManifest
 :app:preDebugBuild UP-TO-DATE
 :app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
 :app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
 :app:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
 :app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
 :app:prepareComCjjMaterialrefeshlayoutLibrary130Library UP-TO-DATE
 :app:prepareFinancialPHKXMyLibrayUnspecifiedLibrary UP-TO-DATE
 :app:prepareReleaseDependencies
 :app:compileReleaseAidl UP-TO-DATE
 :app:compileReleaseRenderscript UP-TO-DATE
 :app:generateReleaseBuildConfig UP-TO-DATE
 :app:generateReleaseAssets UP-TO-DATE
 :app:mergeReleaseAssets UP-TO-DATE
 :app:generateReleaseResValues UP-TO-DATE
 :app:generateReleaseResources UP-TO-DATE
 :app:mergeReleaseResources UP-TO-DATE
 :app:processReleaseManifest UP-TO-DATE
 :app:processReleaseResources UP-TO-DATE
 :app:generateReleaseSources UP-TO-DATE
 :app:processReleaseJavaRes UP-TO-DATE
 :app:compileReleaseJavaWithJavac UP-TO-DATE
 :app:compileReleaseNdk UP-TO-DATE
 :app:compileReleaseSources UP-TO-DATE
 :app:collectReleaseMultiDexComponents UP-TO-DATE
 :app:proguardRelease UP-TO-DATE
 :app:shrinkReleaseMultiDexComponents FAILED
 Error:Execution failed for task ':app:shrinkReleaseMultiDexComponents'.


java.io.IOException: The output jar [F:\save\YGJY\FinancialYGJY\app\build\intermediates\multi-dex\release\componentClasses.jar] must be specified after an input jar, or it will be empty.
 Information:BUILD FAILED
 Information:Total time: 1.666 secs
 Information:1 error
 Information:0 warnings
 Information:See complete output in console

这是什么意思?

下面是混淆代码,我基本都屏蔽了!

 -keep public class * extends android.app.Fragment
 -keep public class * extends android.app.Activity
 -keep public class * extends android.app.Application
 -keep public class * extends android.app.Service
 -keep public class * extends android.content.BroadcastReceiver
 -keep public class * extends android.content.ContentProvider
 -keep public class * extends android.app.backup.BackupAgentHelper
 -keep public class * extends android.preference.Preference
 -keep public class * extends android.support.v4.**
 -keepclasseswithmembernames class * { # 保持 native 方法不被混淆
 native ;
 }
 -keepclasseswithmembers class * { # 保持自定义控件类不被混淆
 public (android.content.Context, android.util.AttributeSet);
 }
 -keepclasseswithmembers class * {# 保持自定义控件类不被混淆
 public (android.content.Context, android.util.AttributeSet, int);
 }
 -keepclassmembers class * extends android.app.Activity { # 保持自定义控件类不被混淆
 public void (android.view.View);
 }
 -keepclassmembers enum * { # 保持枚举 enum 类不被混淆
 public static *[] values();
 public static ** valueOf(java.lang.String);
 }
 -keep class * implements android.os.Parcelable { # 保持 Parcelable 不被混淆
 public static final android.os.Parcelable$Creator ;
 }
 -keep public class * implements java.io.Serializable{
 public protected private *;
 }
 -keep class com.baidu.*{*;}
 -dontwarn com.baidu.**
 -keep class com.google.gson.**{*;}
 -dontwarn com.google.gson.**
 #bcprov-ext-jdk15on
 -dontwarn org.bouncycastle.**
 #commons-lang-2.4
 -dontwarn org.apache.commons.lang.**
 #adnroid-async-http-1.4.8
 -dontwarn com.loopj.android.http.**
 #androidquery
 -dontwarn com.androidquery.**
 #esb
 -dontwarn com.hansy.qhxg.restClient.**
 #gson-2.2.4
 -dontwarn com.google.gson.**
 #httpcore-4.3.jar
 -dontwarn org.apache.http.**
 #slf4j-api-1.7.5
 -dontwarn org.slf4j.**
 #universal-img-loader
 -dontwarn com.nostra13.universalimageloader.**
取消 提交回答
全部回答(1)
  • 保持可爱mmm
    2019-10-18 10:52:19
    Android Studio混淆打包apk: //混淆,新版本ninifyEnabled再runproguard minifyEnabled true //加载默认混淆配置文件及自定义混淆 配置 proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard.cfg' 设置minifyEnabled true,打包候进行代码混淆处理. 其proguard-android.txt用管sdk目录面主要配置proguard.cfg文件 直接android studio创建项目文件 proguard-rules.pro文件其实项目eclipse迁移前eclipse混淆 proguard.cfg文件
    

    来源于网络,供您参考,如若满意,请点击右侧【采纳答案】,如若还有问题,请点击【追问】 希望我的回答对您有所帮助,望采纳! ~ O(∩_∩)O~

    0 0
相关问答

1

回答

android 代码混淆问题?报错

2020-06-22 20:13:40 279浏览量 回答数 1

1

回答

android 代码混淆的问题?报错

2020-06-14 15:15:43 283浏览量 回答数 1

1

回答

用户反馈Android SDK:找不到alicloud-android-feedback.aar,如

2020-03-27 21:32:17 500浏览量 回答数 1

1

回答

android SDK播放器拖动问题

2018-01-19 17:32:52 2402浏览量 回答数 1

0

回答

【播放器SDK】Android如何实现固定竖屏播放视频

2017-11-29 15:14:08 3656浏览量 回答数 0

1

回答

android播放器sdk支持

2017-11-09 16:51:03 2579浏览量 回答数 1

0

回答

什么是PCDN SDK Android版手册

2017-10-30 09:44:16 4898浏览量 回答数 0

0

回答

用户反馈Android SDK:如何关闭沉浸式任务栏?

2017-10-24 10:51:51 1272浏览量 回答数 0

1

回答

Android SDK Manager

2016-06-13 14:36:16 1882浏览量 回答数 1

1

回答

在android sdk manager中下载东西出现怎么图这是什么原因?如何解决?

2016-03-10 08:42:15 1711浏览量 回答数 1
+关注
2
文章
9426
问答
问答排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载