【发布时间】:2014-11-14 10:57:13
【问题描述】:
我正在尝试通过使用 proguard 来保护我的 apk 文件,以防止黑客轻松反编译我的代码。我在网上遵循了许多关于如何做到这一点的教程,但是当我遵循在线建议时,我的应用程序崩溃了。我遵循的教程是:
Enabling ProGuard in Eclipse for Android
http://proguard.sourceforge.net/manual/examples.html#androidapplication
http://dominoc925.blogspot.com/2013/12/how-to-obfuscate-android-apk-file-using.html
我的源目录中的 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-18
android.library.reference.1=..\\appcompat_v7
android.library.reference.2=../../adt-bundle-windows-x86_64-20140702/sdk/extras/google /google_play_services/libproject/google-play-services_lib
当我尝试导出已签名的 apk 时,控制台中显示以下错误:
[2014-11-14 12:41:18 - SMART calculator] Proguard returned with error code 1. See console
[2014-11-14 12:41:18 - SMART calculator] proguard.ParseException: Unknown option '(' in argument number 14
[2014-11-14 12:41:18 - SMART calculator] at proguard.ConfigurationParser.parse(ConfigurationParser.java:191)
[2014-11-14 12:41:18 - SMART calculator] at proguard.ProGuard.main(ProGuard.java:484)
[2014-11-14 12:41:29 - SMART calculator] Proguard returned with error code 1. See console
第 14 行是 目标=android-18 在 project.properties 文件中。
有人可以帮我解决我遇到的这个错误吗? :)D
【问题讨论】:
标签: java android encryption apk proguard