Reputation: 151
So the problem is that google has update places SDK and have separated them from google play services. now when i updated the places sdk and added :"com.google.android.libraries.places:places-compat:1.1.0"
which is given to by google in the migration guide
https://developers.google.com/places/android-sdk/client-migration
I made some changes and was able to compile and run successfully .
but when i tried to create a release apk for that it is giving me this:
What went wrong:
Execution failed for task ‘:app-guest:transformClassesWithJarMergingForProductionRelease’.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/app/INotificationSideChannel$Stub$Proxy.class.
I think there is some library which is already included in the play services and is being repeated by the new places sdk dependency .
i have already tried the commands for checking dependencies through terminal .
Play services i am using in my app
val plus = artifact(artifactId = "play-services-plus")
val auth = artifact(artifactId = "play-services-auth")
val base = artifact(artifactId = "play-services-base")
val analytics = artifact(artifactId = "play-services-analytics")
val cast = artifact(artifactId = "play-services-cast")
val gcm = artifact(artifactId = "play-services-gcm")
val location = artifact(artifactId = "play-services-location")
val maps = artifact(artifactId = "play-services-maps",version = "16.1.0")
val nearby = artifact(artifactId = "play-services-nearby")
val safetynet = artifact(artifactId = "play-services-safetynet")
val wallet = artifact(artifactId = "play-services-wallet")
val tasks = artifact(artifactId = "play-services-tasks")
Support libraries i am us
// v4 support libraries
val support_compat = artifact("support-compat")
val support_core_utils = artifact("support-core-utils")
val support_core_ui = artifact("support-core-ui")
val support_media_compat = artifact("support-media-compat")
val support_fragment = artifact("support-fragment")
@Deprecated("Prior to Support Library revision 24.2.0, there was a single v4 support library. That library was divided into multiple modules to improve efficiency. For backwards compatibility, if you list support-v4 in your Gradle script, your APK will include all of the v4 modules. However, to reduce APK size, we recommend that you just list the specific modules your app needs.")
val support_v4 = artifact("support-v4")
// Multidex Support Library
/** Multidex - See: https://developer.android.com/studio/build/multidex.html */
val multidex = artifact("multidex", version = Versions.multidex)
val multidex_instrumentation = artifact("multidex-instrumentation", Versions.multidex)
// v7 Support Libraries
val appcompat_v7 = artifact("appcompat-v7")
val cardview_v7 = artifact("cardview-v7")
val gridlayout_v7 = artifact("gridlayout-v7")
val mediarouter_v7 = artifact("mediarouter-v7")
val palette_v7 = artifact("palette-v7")
val recyclerview_v7 = artifact("recyclerview-v7")
val preference_v7 = artifact("preference-v7")
val support_v13 = artifact("support-v13")
val preference_v14 = artifact("preference-v14")
val preference_leanback_v17 = artifact("preference-leanback-v17")
val leanback_v17 = artifact("leanback-v17")
val support_vector_drawable = artifact("support-vector-drawable")
val animated_vector_drawable = artifact("animated-vector-drawable")
val support_annotations = artifact("support-annotations")
val design = artifact("design")
val customtabs = artifact("customtabs")
@Deprecated("As of release 26.0.0, the Percent Support library is deprecated. Clients of this module should migrate to the new ConstraintLayout widget, which is provided as a separate artifact in SDK Manager.")
val percent = artifact("percent")
val exifinterface = artifact("exifinterface")
val recommendation = artifact("recommendation")
val wear = artifact("wear")
val constraint_layout = artifact("constraint-layout", Versions.constraintlayout, ".constraint")
can anyone tell me which library is using this 'INotificationSideChannel' so that i can exclude it .
Upvotes: 1
Views: 5000
Reputation: 190
You must not repeat a library in your app or dependencies . You have to check you have inserted v4 library and compile library?.
delete the repeat library so that just one V4 remains.
in your app dir build.gradle file add this command:
android{
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
all*.exclude group: 'com.android.support', module: 'support-annotations'
}
}
Upvotes: 1