Android Progaurd - Internet connection issue after exporting an application

I am currently exporting the application while progaurd is on, and the problem is that the application is working fine, but the application is deploying without progaurd, but if it is exported and deployed while progaurd is running, the application reports an error that the Internet is not connected. followin is a progaurd file

-dontshrink -dontoptimize -dontwarn com.example.google.tv.** -dontwarn android.support.** -dontwarn org.ksoap.** -dontwarn android.view.** -dontwarn android.graphics.** -dontwarn android.content.** -dontwarn android.util.** -keep public class * extends android.app.backup.BackupAgentHelper -keep public class * extends android.preference.Preference #-libraryjars libs/ksoap2-android-assembly-2.5.2-jar-with-dependencies.jar #-libraryjars libs/android-support-v4.jar 

If i remove

 -dontwarn android.view.** -dontwarn android.graphics.** -dontwarn android.content.** -dontwarn android.util.** 

then here is the magazine that I get

 [2013-08-02 10:29:04 - Project] Proguard returned with error code 1. See console [2013-08-02 10:29:04 - Project] Note: there were 4 duplicate class definitions. [2013-08-02 10:29:04 - Project] Warning: library class android.content.res.XmlResourceParser extends or implements program class org.xmlpull.v1.XmlPullParser [2013-08-02 10:29:04 - Project] Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser [2013-08-02 10:29:04 - Project] Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlSerializer [2013-08-02 10:29:04 - Project] Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlPullParser [2013-08-02 10:29:04 - Project] Warning: library class android.content.res.ColorStateList depends on program class org.xmlpull.v1.XmlPullParser [2013-08-02 10:29:04 - Project] Warning: library class android.graphics.drawable.BitmapDrawable depends on program class org.xmlpull.v1.XmlPullParser [2013-08-02 10:29:04 - Project] Warning: library class android.graphics.drawable.ColorDrawable depends on program class org.xmlpull.v1.XmlPullParser [2013-08-02 10:29:04 - Project] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser [2013-08-02 10:29:04 - Project] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser [2013-08-02 10:29:04 - Project] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser [2013-08-02 10:29:04 - Project] Warning: library class android.graphics.drawable.LayerDrawable depends on program class org.xmlpull.v1.XmlPullParser [2013-08-02 10:29:04 - Project] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser [2013-08-02 10:29:04 - Project] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser [2013-08-02 10:29:04 - Project] You should check if you need to specify additional program jars. [2013-08-02 10:29:04 - Project] Warning: there were 13 instances of library classes depending on program classes. [2013-08-02 10:29:04 - Project] You must avoid such dependencies, since the program classes will [2013-08-02 10:29:04 - Project] be processed, while the library classes will remain unchanged. [2013-08-02 10:29:04 - Project] java.io.IOException: Please correct the above warnings first. [2013-08-02 10:29:04 - Project] at proguard.Initializer.execute(Initializer.java:321) [2013-08-02 10:29:04 - Project] at proguard.ProGuard.initialize(ProGuard.java:211) [2013-08-02 10:29:04 - Project] at proguard.ProGuard.execute(ProGuard.java:86) [2013-08-02 10:29:04 - Project] at proguard.ProGuard.main(ProGuard.java:492) 
+4
source share
1 answer

You must remove the org.xmlpull.v1 package from your libraries. It is already present in the Android runtime (which in any case takes precedence). Adding duplicate packages at best increases the size of the application, and in the worst case, this can lead to versioning problems. In this case, ProGuard detects some dependency conflicts.

Please note that this is "ProGuard" and not "Progaurd".

+1
source

Source: https://habr.com/ru/post/1494888/


All Articles