简体   繁体   English

Android + In-App BIlling + Proguard

[英]Android + In-App BIlling + Proguard

I have created the app with in-app biling and now I want to obfuscate my code to short the chance to crack it. 我已经使用应用程序内打包创建了应用程序,现在我想混淆我的代码以缩短破解它的机会。 BUt there is some problems with proguard setup. BUt有一些proguard设置问题。 I am trying to setup it by this tutorial . 我试图通过本教程设置它。 My project structure is common and the main project has the reference to other project which has IN-app service with all functionality. 我的项目结构很常见,主项目引用了其他具有所有功能的IN-app服务的项目。 I have stopped on the last step where is executing ant release with code obfuscating. 我已经停止了最后一步,执行ant发布,代码混淆。 All the time I receive: 我收到的所有时间:

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.

The error notifies me that something is not found but what and how to fix it? 错误通知我没有找到某些东西但是找到了什么以及如何修复它?

ANother thing, when I was on the second step where is ant release of unsigned project without obfuscating I have received succes but with some notification: "It seems that you have subprojects, if so, please use --subprojects command". 另一件事,当我在第二步,在没有混淆的情况下释放未签名的项目时,我已经收到了成功,但有一些通知:“看来你有子项目,如果有的话,请使用--subprojects命令”。 I try to add this parameter and receive totally succes without nitifications quite long but I cannot update subprojects. 我尝试添加这个参数,并在没有硝化的情况下获得完全成功,但是我无法更新子项目。 I m not sure it s very bad or not. m not sure it是不是很糟糕。 Please could you help me to fix this moment too. 你能帮我解决这个问题。

The tutorial that you are using is outdated. 您正在使用的教程已过时。 ProGuard is now part of the Android SDK. ProGuard现在是Android SDK的一部分。 You can enable it by commenting in the corresponding line in project.properties, as explained in the documentation of the Android SDK. 您可以通过在project.properties中的相应行中注释来启用它,如Android SDK 文档中所述。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM