错误:任务':app:transformClassesWithJarMergingForDebug'执行失败

时间:2017-07-22 16:29:54

标签: android

  

错误:任务':app:transformClassesWithJarMergingForDebug'执行失败。   com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / google / android / gms / ads / identifier / AdvertisingIdClient.class

这是我的build.gradle文件。我无法解决它。

> HCI Event: LE Meta Event (0x3e) plen 43                       [hci1] 4.746057
      LE Advertising Report (0x02)
        Num reports: 1
        Event type: Non connectable undirected - ADV_NONCONN_IND (0x03)
        Address type: Public (0x00)
        Address: A0:E6:F8:48:32:94 (Texas Instruments Inc)
        Data length: 31
        Flags: 0x05
          LE Limited Discoverable Mode
          BR/EDR Not Supported
        Company: not assigned (37984)
          Data: 3248f8e6a000
        128-bit Service UUIDs (complete): 1 entry
          32f9169f-4feb-4883-ade6-1f0127018db3
        RSSI: -61 dBm (0xc3)
> HCI Event: LE Meta Event (0x3e) plen 43                       [hci0] 5.198878
      LE Advertising Report (0x02)
        Num reports: 1
        Event type: Non connectable undirected - ADV_NONCONN_IND (0x03)
        Address type: Public (0x00)
        Address: A0:E6:F8:48:38:6F (Texas Instruments Inc)
        Data length: 31
        Flags: 0x05
          LE Limited Discoverable Mode
          BR/EDR Not Supported
        Company: not assigned (28512)
          Data: 3848f8e6a000
        128-bit Service UUIDs (complete): 1 entry
          32f9169f-4feb-4883-ade6-1f0127018db3
        RSSI: -85 dBm (0xab)
> HCI Event: LE Meta Event (0x3e) plen 43                       [hci1] 5.819728
      LE Advertising Report (0x02)
        Num reports: 1
        Event type: Non connectable undirected - ADV_NONCONN_IND (0x03)
        Address type: Public (0x00)
        Address: A0:E6:F8:48:EF:78 (Texas Instruments Inc)
        Data length: 31
        Flags: 0x05
          LE Limited Discoverable Mode
          BR/EDR Not Supported
        Company: not assigned (30816)
          Data: ef48f8e6a000
        128-bit Service UUIDs (complete): 1 entry
          32f9169f-4feb-4883-ade6-1f0127018db3
        RSSI: -70 dBm (0xba)
> HCI Event: LE Meta Event (0x3e) plen 43                       [hci0] 6.011983
      LE Advertising Report (0x02)
        Num reports: 1
        Event type: Non connectable undirected - ADV_NONCONN_IND (0x03)
        Address type: Public (0x00)
        Address: A0:E6:F8:48:87:DA (Texas Instruments Inc)
        Data length: 31
        Flags: 0x05
          LE Limited Discoverable Mode
          BR/EDR Not Supported
        Company: not assigned (55904)
          Data: 8748f8e6a000
        128-bit Service UUIDs (complete): 1 entry
          32f9169f-4feb-4883-ade6-1f0127018db3
        RSSI: -74 dBm (0xb6)

2 个答案:

答案 0 :(得分:0)

据我所知,所有谷歌播放服务都应该使用相同的版本 - 在你的依赖项部分,你可以看到你不是(有些是7.3.0,有些是9.8.0)。更改它以便它们都使用相同的版本并重试。

答案 1 :(得分:0)

尝试将tools:node="merge"放入清单文件中的Application标记,如下所示:

<application
        android:name=".MyApplication"
        android:allowBackup="false"
        android:icon="@drawable/icon144x"
        android:label="@string/app_name"
        android:supportsRtl="true"
        tools:node="merge"
        android:theme="@style/AppTheme">

</application>

希望它能解决问题。