2014-11-14 3 views
0

해커가 내 코드를 쉽게 디 컴파일하지 못하도록 proguard를 사용하여 apk 파일을 보호하려고합니다. 나는 이것을하는 방법에 대한 온라인 튜토리얼을 많이 따라 왔지만, 온라인으로 조언을 따를 때 나의 애플리케이션은 부서진다.안드로이드에 실패한 proguard 활성화

# 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 

내가하려고 할 때 :

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 파일은 다음과 같습니다 내가 따랐다 자습서에있는 서명 된 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)은 라인 = 안드로이드 18 project.properties 파일 대상이다.

누구든지 제가이 오류를 해결할 수 있도록 도와주세요. :) D

답변

0

이. 라인 주석 해제 - project.properties 파일에서

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 

; 당신의 프로젝트를 청소하십시오; 테스트 장치에 약 10 시간 동안 프로젝트를 컴파일하고 실행 /로드하십시오. 잠시 후 Proguard라는 폴더가 기본 디렉토리에 나타나며 그 안에 4 개의 텍스트 파일이 있습니다. 이 폴더로 성미하지 마십시오. apk를 내보낼 때 위의 줄에 주석을 달아주십시오. & apk는 오류가 발생하지 않고 내보내집니다. 내가 수출 한 APK를 디 컴파일하려고 시도했지만 코드가 Proguard에 방해되어 리버스 엔지니어링이 매우 어렵습니다.

이것은 매우 이상한 해결책이지만 내 프로젝트에서 효과가있었습니다.

0
proguard.config=proguard-project.txt 

사용 나는 빠른 수정을 발견하는 대신

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 
+0

여전히 같은 오류가 발생합니다. 변화가 도움이되지 못했습니다. 무엇이 잘못되었을 수 있습니까? – nyatsimbamutota

+0

앱을 내보내는 중에 오류가 발생하면 ... – Arunkumar

+0

은 프로젝트 이름, 클래스 이름 또는 폴더 이름에 공백 또는 '(' – Arunkumar