2017-04-23 2 views
2

Firebase 플랫폼을 사용하여 알림을 사용하여 간단한 애플리케이션을 개발하려고합니다. 오류 :app:transformClassesWithDexForDebug을 받았는데 을 build.gradle에 추가하여 해결했습니다.transformClassesWithJarMergingForDebug 기기에서 앱을 실행하는 동안 오류가 발생했습니다.

apply plugin: 'com.android.application' 
apply plugin: 'com.google.gms.google-services' 

android 

    { 
     compileSdkVersion 25 
     buildToolsVersion "25.0.2" 
     defaultConfig { 
      applicationId "com.example.jaroslavvystavel.noti" 
      minSdkVersion 17 
      targetSdkVersion 25 
      multiDexEnabled true // this line will solve this problem 
      versionCode 1 
      versionName "1.0" 
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
     } 
     buildTypes { 
      release { 
       minifyEnabled false 
       proguardFiles getDefaultProguardFile('proguard-android.txt'),  'proguard-rules.pro' 
      } 
      debug { 
       debuggable true 
      } 
     }  
    } 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:25.3.1' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    testCompile 'junit:junit:4.12' 

    compile 'com.google.firebase:firebase-messaging:10.2.1' 
} 

빌드 내가 연결된 전화에서 응용 프로그램을 실행하려고 할 때 문제가 발생, 문제없이 : 이 편집 후 나는 오류 :app:transformClassesWithJarMergingForDebugbuild.gradle을 얻고있다. 내가 AVD를 사용할 때 나는 메시지 App has stopped를받을 .. 내가 응용 프로그램을 개발하고이 튜토리얼에 따라 YouTube tutorial

답변

0

종속성 블록 따라야합니다 google-servicesapply plugin :

dependencies { 
    ... 
} 
apply plugin: 'com.google.gms.google-services' 

이가에 대한 문서에서 설명을 Google Services Gradle Plugin.

관련 문제