2011-12-16 7 views
8

私は私のAndroidアプリ上でProGuardのを実行しようとして問題に実行しています。ProGuardのとAndroid :(

私はそれがアンドロイドと競合しないように、名前が変更されたパッケージとの完全な快活なお城のSpongyCastle瓶(コピーと過去を使用していますバージョンに組み込まれて快活なお城)ProGuardのを実行している場合

私は、次の

私はこれをどのように修正すればよいを参照してください?私のLIBSにrt.jarのを追加しますか?

ProGuardのの全体のポイントは、コードを縮小することで、しかし、私はこれらを回避するために瓶を追加し続けていますプロガードがクラスを見つけることができないと不満を訴える場所を訴えます!何か不足していますか?

[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.InitialDirContext 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.InitialDirContext 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchResult 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchResult 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.Attributes 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.Attribute 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.Attribute 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingException 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.Attributes 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchResult 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingException 
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext 
[proguard] Note: the configuration refers to the unknown class 'android.app.backup.BackupAgentHelper' 
[proguard] Note: the configuration refers to the unknown class 'com.android.vending.licensing.ILicensingService' 
[proguard] Note: there were 2 references to unknown classes. 
[proguard]  You should check your configuration for typos. 
[proguard] Warning: there were 57 unresolved references to classes or interfaces. 
[proguard]   You may need to specify additional library jars (using '-libraryjars'), 
[proguard]   or perhaps the '-dontskipnonpubliclibraryclasses' option. 

UILD FAILED 
:\AndroidSDK\android-sdk_r12-windows\android-sdk-windows\tools\ant\build.xml:713: Please correct the above warnings first. 

更新

ANT Script 

私はプロジェクトがいつか前に作成されたとのbuild.xmlを生成するのにandroid update project --path .を使用し、私はすべての変更

<?xml version="1.0" encoding="UTF-8"?> 
    <project name="RootActivity" default="help"> 
     <loadproperties srcFile="local.properties" /> 
     <property file="ant.properties" /> 
     <loadproperties srcFile="project.properties" /> 
     <fail message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'" unless="sdk.dir" /> 
     <import file="${sdk.dir}/tools/ant/build.xml" /> 
    </project> 
+0

あなたはantスクリプトの一部を担当することができますか?これはアンドロイドで標準のJavaライブラリをインポートする際の問題のようです... – SuperTron

+0

私はアンドロイド更新プロジェクト - パスを使用しました。プロジェクトが作成された時点でbuild.xmlを生成しましたが、何も変更していません <?xml version = "1.0" encoding = "UTF-8"?> <プロパティファイル= "ant.properties" /> < メッセージを失敗= "sdk.dirが存在しない場合、" android update project "" "を使用してlocal.propertiesを生成してください。 /> user964283

+0

関連する[問題#27612](http://code.google.com/p/android/issues/) detail?id = 27612)。 –

答えて

4

Iドンを加えていませんあなたのライブラリにrt.jarを追加する必要があるとは思わない。あなたはあなたのproguardスクリプトでそれを適切に参照していることを確認する必要があります。たとえば、hereを見てください。あなたはProGuardのためのXML表記を使用している場合が、

-libraryjars ${java.home}/lib/rt.jar 

、その構文の変更:セクション2でのこの行は、お金のメーカーです。責任を負うアリスクリプトの部分を投稿すると、私はより多くの援助を得ようとすることができます。お役に立てれば!

+0

はうまくいった!ありがとう – user964283

18

-dontwarn javax.naming.**をProguard構成に追加します。

これは単なる警告であり、無視することは問題ではありません。

+0

これも動作します、ありがとう – user964283

+9

これは正式に推奨されるソリューションです。 Androidではネーミングパッケージが見つかりませんが、明らかにこれは問題を引き起こすものではありません。 –

+0

同じ問題を持っているが、グラデーションベースのビルド(アンドロイドスタジオ)を持っている人は、この答えをチェックしてください:http://stackoverflow.com/q/18481752/1041533両方のproguardファイルが正しく含まれていることを確認してください!上記のステートメントを含むデフォルトのものとあなたのもの – AgentKnopf

関連する問題