File conflicts caused by Android Google stats

Source: Internet
Author: User
Tags jcenter

Android Studio joins Google stats

1.

Buildscript {repositories {jcenter ()} dependencies {Classpath'com.android.tools.build:gradle:2.2.3'Classpath'com.neenbedankt.gradle.plugins:android-apt:1.8'Classpath'com.google.gms:google-services:3.0.0'        //Note:do not place your application dependencies here; they belong//In the individual module build.gradle files}}allprojects {repositories {jcenter ()}}task Clean (type:delete) {Delete Rootproject.builddir} 

2.

Dependencies {    //  Google stats    'com.google.android.gms: play-services-analytics:10.0.1' com.google.gms.google-services  '

Abnormal:

 for ' : App:transformclasseswithdexfordebug ' . > com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException: Java.util.concurrent.ExecutionException:com.android.dex.DexException:Multiple dex Files Define Lcom/google/android /gms/internal/ZZSL;

Positioning issues:

1, see external libraries in the jar package, found a more    play-services-ads:8.4.  0 , and one of the ZZSL files and play-services-analytics: ZZSL file conflicts in10.0. 1
2, a new project, according to the above method to introduce Google statistics, found that there is no play-services-ads:8.4.0
3, speculation may be a place to introduce ads lead to conflict

Workaround:

' com.google.android.gms:play-services-analytics:10.0.1 ' ' com.google.android.gms:play-services-ads:10.0.1 '      

Simultaneous introduction of analytics and ads to avoid conflicts

File conflicts caused by Android Google stats

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.