2011-12-16 11 views
8

मैं मैं SpongyCastle जार (कॉपी और पैकेज के साथ पूर्ण उछाल वाले महल के अतीत का नाम बदलकर उपयोग कर रहा हूँ तो यह एंड्रोइड्स से विरोध नहीं करता अपने Android एप्लिकेशन पर Proguard को चलाने के लिए कोशिश कर रहा हूँ और समस्याओं में घिर गए।Proguard और एंड्रॉयड :(

उछाल वाले संस्करण में बनाया महल)

जब 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 

मैं android update project --path . इस्तेमाल किया build.xml के रूप में परियोजना कुछ समय पहले बनाया गया था उत्पन्न करने के लिए और मैं किसी भी परिवर्तन

नहीं किया है
<?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

क्या आप अपनी चींटी स्क्रिप्ट का हिस्सा जिम्मेदार पोस्ट कर सकते हैं? यह एंड्रॉइड में मानक जावा पुस्तकालयों को आयात करने में एक समस्या की तरह लगता है ... – SuperTron

+0

मैंने एंड्रॉइड अपडेट प्रोजेक्ट --पथ का उपयोग किया। build.xml उत्पन्न करने के लिए, क्योंकि परियोजना को कुछ समय पहले बनाया गया था और मैंने कोई बदलाव नहीं किया है <परियोजना का नाम = "रूट सक्रियता" डिफ़ॉल्ट = "सहायता"> <संपत्ति फ़ाइल = "ant.properties" /> <असफल संदेश = "sdk.dir गुम है। 'एंड्रॉइड अपडेट प्रोजेक्ट' का उपयोग करके स्थानीय.प्रोपर्टीज उत्पन्न करना सुनिश्चित करें" = "sdk.dir" /> <आयात फ़ाइल = "$ {sdk.dir} /tools/ant/build.xml" /> – user964283

+0

कोई संबंधित [मुद्दा # 27612] (http://code.google.com/p/android/issues/ है) विस्तार? id = 27612)। –

उत्तर

4

मैं डॉन ऐसा नहीं लगता कि आपकी libs में rt.jar जोड़ने की ज़रूरत है। आपको यह सुनिश्चित करने की ज़रूरत है कि आप इसे अपने प्रोजेवार्ड स्क्रिप्ट में ठीक से संदर्भित कर रहे हैं। उदाहरण के लिए here देखें।

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

हालांकि, कि वाक्य रचना में परिवर्तन करता है, तो आप ProGuard के लिए एक्सएमएल संकेतन का उपयोग: धारा 2 में इस लाइन पैसे निर्माता है। यदि आप एंटी स्क्रिप्ट का हिस्सा पोस्ट करते हैं जो ज़िम्मेदार है तो मैं अधिक सहायता के लिए प्रयास कर सकता हूं। उम्मीद है की यह मदद करेगा!

+0

काम किया! धन्यवाद – user964283

18

अपने प्रोगार्ड कॉन्फ़िगरेशन में निम्न, -dontwarn javax.naming.** जोड़ें।

वे केवल चेतावनियां हैं, और उन्हें अनदेखा करना कोई मुद्दा नहीं होना चाहिए।

+0

यह भी काम करता है, धन्यवाद – user964283

+9

यह आधिकारिक तौर पर अनुशंसित समाधान है। एंड्रॉइड पर नामकरण पैकेज गुम है, लेकिन स्पष्ट रूप से यह कोई समस्या नहीं पैदा कर रहा है। –

+0

अन्य लोगों के लिए एक ही समस्या है लेकिन एक ग्रेड-आधारित बिल्ड (एंड्रॉइड स्टूडियो) के साथ - यह जवाब देखें: http://stackoverflow.com/q/18481752/1041533 और दोनों प्रोग्रामिंग फ़ाइलों को सही ढंग से शामिल करना सुनिश्चित करें!इसके ऊपर उपरोक्त बयान के साथ डिफ़ॉल्ट और आपका – AgentKnopf

संबंधित मुद्दे