我已经创建了应用程序内绑定的应用程序,现在我想混淆我的代码,以缩短破解它的机会。BUt proguard设置有一些问题。我正在尝试通过this tutorial来设置它。我的项目结构是常见的,主项目有参考其他项目,其中有在应用程序服务的所有功能。我已经在最后一步停止了,这一步是使用代码混淆来执行ant release。所有的时间我都收到:
Buildfile: /home/viktor/Desktop/Dropbox/work/MyProject/build.xml
-set-mode-check:
-set-release-mode:
-release-obfuscation-check:
[echo] proguard.config is /home/viktor/android-sdk-linux/tools/proguard/proguard-android.txt:proguard-project.txt
[echo] Proguard.config is enabled
-check-env:
[checkenv] Android SDK Tools Revision 21
[checkenv] Installed at /home/viktor/android-sdk-linux
-setup:
[echo] Project Name: MyProject
[gettype] Project Type: Application
-build-setup:
[echo] Resolving Build Target for MyProject...
[gettarget] Project Target: Google APIs
[gettarget] Vendor: Google Inc.
[gettarget] Platform Version: 4.1.2
[gettarget] API level: 16
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for MyProject...
[dependency] Library dependencies:
[dependency]
[dependency] ------------------
[dependency] Ordered libraries:
[echo] ----------
[echo] Building Libraries with 'release'...
nodeps:
-set-mode-check:
-set-release-mode:
-release-obfuscation-check:
[echo] proguard.config is ${proguard.config}
-check-env:
[checkenv] Android SDK Tools Revision 21
[checkenv] Installed at /home/viktor/android-sdk-linux
-setup:
[echo] Project Name: AndroidBillingLibrary
[gettype] Project Type: Android Library
-build-setup:
[echo] Resolving Build Target for AndroidBillingLibrary...
[gettarget] Project Target: Android 4.0.3
[gettarget] API level: 15
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for AndroidBillingLibrary...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
-pre-build:
-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files...
[aidl] Found 1 AIDL files.
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] No changed resources. R.java and Manifest.java untouched.
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.
-pre-compile:
-compile:
[echo] Creating library output jar file...
-post-compile:
-obfuscate:
-dex:
[echo] Library project: do not convert bytecode...
-crunch:
[crunch] Crunching PNG Files in source dir: /home/viktor/Desktop/Dropbox/work/AndroidBillingLibrary/res
[crunch] To destination dir: /home/viktor/Desktop/Dropbox/work/AndroidBillingLibrary/bin/res
[crunch] Crunched 0 PNG files to update cache
-package-resources:
[echo] Library project: do not package resources...
-package:
[echo] Library project: do not package apk...
-post-package:
-release-prompt-for-password:
-release-nosign:
[echo]
[propertyfile] Updating property file: /home/viktor/Desktop/Dropbox/work/AndroidBillingLibrary/bin/build.prop
[propertyfile] Updating property file: /home/viktor/Desktop/Dropbox/work/AndroidBillingLibrary/bin/build.prop
[propertyfile] Updating property file: /home/viktor/Desktop/Dropbox/work/AndroidBillingLibrary/bin/build.prop
[propertyfile] Updating property file: /home/viktor/Desktop/Dropbox/work/AndroidBillingLibrary/bin/build.prop
-release-sign:
-post-build:
release:
-pre-build:
-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] No changed resources. R.java and Manifest.java untouched.
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.
-pre-compile:
-compile:
-dex-obfuscate:
-dex-no-obfuscate:
BUILD FAILED
/home/viktor/Desktop/Dropbox/work/MyProject/add-proguard-release.xml:14: /home/viktor/Desktop/Dropbox/work/MyProject/${out.classes.dir} does not exist.这个错误通知我没有找到一些东西,但是什么和如何修复它?
ANother的事情,当我在没有混淆的情况下发布未签名项目的第二步时,我收到了一些成功的通知:“看起来你有子项目,如果有,请使用--subprojects命令”。我尝试添加此参数,并收到完全成功,但没有很长时间,但我不能更新子项目。Im not sure it‘这是不是很糟糕。你能帮我把这个时刻也修好吗?
发布于 2012-11-26 07:05:40
您正在使用的教程已过时。ProGuard现在是Android SDK的一部分。您可以按照Android SDK的documentation中的说明,在project.properties中的相应行中添加注释来启用它。
https://stackoverflow.com/questions/13497539
复制相似问题