2013-11-22 3 views
3

Я получаю эту странную ошибку от proguard при экспорте приложения для Android. Я редактировал файл конфигурации. Но я не мог найти, что такое остальные ошибки.Предупреждение: класс библиотеки android.net.http.AndroidHttpClient расширяет или реализует класс программы org.apache.http.client.HttpClient

Я добавил внешние банки, настроенные -dontwarn, теперь я не смог найти оставшиеся проблемы.

[2013-11-22 17:13:31 - MyProject] Note: there were 1267 duplicate class definitions. 
[2013-11-22 17:13:31 - MyProject] Warning: library class android.net.http.AndroidHttpClient extends or implements program class org.apache.http.client.HttpClient 
[2013-11-22 17:13:31 - MyProject]  You should check if you need to specify additional program jars. 
[2013-11-22 17:13:31 - MyProject] Warning: there were 1 instances of library classes depending on program classes. 
[2013-11-22 17:13:31 - MyProject]   You must avoid such dependencies, since the program classes will 
[2013-11-22 17:13:31 - MyProject]   be processed, while the library classes will remain unchanged. 
[2013-11-22 17:13:31 - MyProject] java.io.IOException: Please correct the above warnings first. 
[2013-11-22 17:13:31 - MyProject] at proguard.Initializer.execute(Initializer.java:321) 
[2013-11-22 17:13:31 - MyProject] at proguard.ProGuard.initialize(ProGuard.java:211) 
[2013-11-22 17:13:31 - MyProject] at proguard.ProGuard.execute(ProGuard.java:86) 
[2013-11-22 17:13:31 - MyProject] at proguard.ProGuard.main(ProGuard.java:492) 

My ProGuard Файл конфигурации:

# 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 /libs/commons-codec-1.6.jar 
-libraryjars /libs/commons-logging-1.1.3.jar 
-libraryjars /libs/fluent-hc-4.3.jar 
-libraryjars /libs/gson-2.2.4.jar 
-libraryjars /libs/httpclient-4.3.jar 
-libraryjars /libs/httpclient-cache-4.3.jar 
-libraryjars /libs/httpmime-4.3.jar 
-libraryjars /libs/picasso-2.0.1.jar 
-libraryjars /libs/picasso-2.0.1.jar 


-dontwarn javax.xml.stream.events.** 
-dontwarn com.squareup.okhttp.** 
-dontwarn com.google.android.gms.auth.GoogleAuthUtil 
-dontwarn com.squareup.picasso.OkHttpLoader 
-dontwarn com.squareup.picasso.OkHttpDownloader 
-dontwarn org.apache.commons.logging.impl.AvalonLogger 
-dontwarn org.apache.commons.logging.impl.Log4JLogger 
-dontwarn org.apache.commons.logging.impl.LogKitLogger 
-dontwarn org.apache.commons.logging.impl.ServletContextCleaner 
-dontwarn org.apache.http.impl.auth.GGSSchemeBase 
-dontwarn org.apache.http.impl.auth.KerberosScheme 
-dontwarn org.apache.http.impl.auth.SPNegoScheme 
-dontwarn org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage 
-dontwarn org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage 
-dontwarn org.apache.http.impl.auth.NegotiateScheme 


-keep class * extends java.util.ListResourceBundle { 
    protected Object[][] getContents(); 


} 

ответ

0

Попробуйте добавить это в файле конфигурации ProGuard.

-libraryjars libs\android-support-v4.jar 
-libraryjars <java.home>\lib\rt.jar 

-dontwarn org.apache.commons.** 

Кроме того, почему у вас есть -libraryjars /libs/picasso-2.0.1.jar?

Посмотрите this answer

Смежные вопросы