2017-04-23 11 views
2

Firebaseプラットフォームを使用して通知で簡単なアプリケーションを開発しようとしています。私はエラー:app:transformClassesWithDexForDebugを受け取りました。multiDexEnabled truebuild.gradleに追加して修正しました。 は、この編集した後、私はエラー:app:transformClassesWithJarMergingForDebug マイ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' 
} 

ビルドは問題なくである私は、接続された携帯電話上でアプリケーションを実行しようとすると、問題が発生します。私はAVDを使用するとき、私はメッセージApp has stoppedを受け取る。.. 私はアプリを開発していた、このチュートリアルに従ってYouTube tutorial

答えて

0

依存関係のブロックに従わなければならないgoogle-servicesためapply plugin

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

これは、のドキュメントに記述されているがGoogle Services Gradle Plugin

関連する問題