2016-02-19 77 views
3

最近,我使用SMP SDK - SAP技术为Android构建了一个应用程序。出于安全原因,我不得不混淆开发应用程序的所有代码&罐子。我试图混淆所有的罐子,但我有以下错误。 寻找最好的方式来在没有/使用progaurd的情况下以任何其他方式混淆整个应用程序。使用Proguard为Android应用程序混淆SMP库

[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.PersistenceManagerImpl 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.PersistenceManagerImpl 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.dao.model.RequestSchema 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.dao.model.RequestSchema 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.PersistenceManagerImpl 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.dao.model.RequestSchema 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.dao.model.RequestSchema 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.dao.model.RequestSchema 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.dao.model.RequestSchema 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.dao.model.RequestSchema 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.PersistenceManagerImpl 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.dao.model.RouteManagerSchema 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.dao.model.RouteManagerSchema 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.dao.model.RouteManagerSchema 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.PersistenceManagerImpl 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.PersistenceManagerImpl 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.PersistenceManagerImpl 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.PersistenceManagerImpl 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.dao.model.IDbSchema 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.mobile.lib.request.DBWrapper: can't find referenced class com.sap.mobile.lib.persistence.dao.model.RequestSchema 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.smp.rest.AppSettings: can't find referenced class com.sybase.persistence.DataVault$DVPasswordPolicy 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.smp.rest.AppSettings: can't find referenced class com.sybase.persistence.DataVault$DVPasswordPolicy 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.smp.rest.AppSettings: can't find referenced class com.sybase.persistence.DataVault$DVPasswordPolicy 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.smp.rest.AppSettings: can't find referenced class com.sybase.persistence.DataVault 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.smp.rest.AppSettings: can't find referenced class com.sybase.persistence.DataVault$DVPasswordPolicy 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: com.sap.smp.rest.AppSettings: [2016-02-19 16:28:58 - SMP_Bank_Project]  You should check if you need to specify additional program jars. 
[2016-02-19 16:28:58 - SMP_Bank_Project] Warning: there were 69 unresolved references to classes or interfaces. 
[2016-02-19 16:28:58 - SMP_Bank_Project]   You may need to specify additional library jars (using '-libraryjars'). 
[2016-02-19 16:28:58 - SMP_Bank_Project] java.io.IOException: Please correct the above warnings first. 
[2016-02-19 16:28:58 - SMP_Bank_Project] at proguard.Initializer.execute(Initializer.java:321) 
[2016-02-19 16:28:58 - SMP_Bank_Project] at proguard.ProGuard.initialize(ProGuard.java:211) 
[2016-02-19 16:28:58 - SMP_Bank_Project] at proguard.ProGuard.execute(ProGuard.java:86) 
[2016-02-19 16:28:58 - SMP_Bank_Project] at proguard.ProGuard.main(ProGuard.java:492) 

Progaurd.txt文件

# To enable ProGuard in your project, edit project.properties 
# to define the proguard.config property as described in that file. 
# 
# Add project specific ProGuard rules here. 
# By default, the flags in this file are appended to flags specified 
# in ${sdk.dir}/tools/proguard/proguard-android.txt 
# You can edit the include path and order by changing the ProGuard 
# include property in project.properties. 
# 
# For more details, see 
# http://developer.android.com/guide/developing/tools/proguard.html 

# Add any project specific keep options here: 

# If your project uses WebView with JS, uncomment the following 
# and specify the fully qualified class name to the JavaScript interface 
# class: 
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { 
# public *; 
#} 

-libraryjars ${external.libs.dir}:${libraryjarpath} 

-keep class com.sap.smp.** 
-dontwarn com.sap.smp.* 
-keep class com.sap.mobile.** 
-dontwarn com.sap.mobile.* 

-keep class com.sap.smp.rest.AppSettings.** 
-dontwarn com.sap.smp.rest.AppSettings.* 

-printmapping mapping.txt 

回答

0

试试这个保持com.sap包的所有类和它的子包。

-keep class com.sap.** { 
    public protected private *; 
} 
-dontwarn com.sap.** 
相关问题