zoukankan      html  css  js  c++  java
  • android防止APK被反编译的方法

     在Eclipse中生成一个android项目时,Eclipse会自动生成一个project.properties文件,打开这个文件(下面以我写的一个项目中的这个文件为例),里面的内容如下所示:

    # This file is automatically generated by Android Tools.
    # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
    #
    # This file must be checked in Version Control Systems.
    #
    # To customize properties used by the Ant build system edit
    # "ant.properties", and override values to adapt the script to your
    # project structure.
    #
    # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
    #proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt

    # Project target.
    target=android-10

    若想防止自己的劳动成果不被别人轻易地剽窃,就在这个project.properties文件中最后的地方添加这样一句话:proguard.config=proguard.cfg ,添加后这个文件中的整体内容如下所示:

    # This file is automatically generated by Android Tools.
    # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
    #
    # This file must be checked in Version Control Systems.
    #
    # To customize properties used by the Ant build system edit
    # "ant.properties", and override values to adapt the script to your
    # project structure.
    #
    # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
    #proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt

    # Project target.
    target=android-10
    proguard.config=proguard.cfg

    这样处理之后生成的APK文件就能很好地防止反编译了

     


  • 相关阅读:
    SpringBoot2.x整合JDBC及初始化data.sql和schema.sql脚本
    CentOS7安装docker以及错误解决
    Maven的scope属性作用域范围
    (转)排序算法之简单选择排序
    系统开发博客专栏
    IDEA启动报错Plugin Error Problems found loading plugins的解决办法
    Promise函数的使用
    (转)排序算法之希尔排序
    .net Core AJAX使用Header传递参数,以JsonResult返回信息
    MVC 扩展RadioButtonListFor和CheckBoxListFor
  • 原文地址:https://www.cnblogs.com/dyllove98/p/3119941.html
Copyright © 2011-2022 走看看