2016-12-20 11 views
0

-----電話では機能しませんが、Noxエミュレータ、タブでの作業は... インストール後アプリ停止...表示残念ながらアプリは停止しました... jsonファイルも追加しました。指紋(SH1)...どうやって修正しましたか?火災基地の統合後にAndroidアプリが停止する

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.0" 
    defaultConfig { 
    applicationId "com.example.nil_akash.laws" 
    minSdkVersion 15 
    targetSdkVersion 25 
    versionCode 1 
    versionName "1.0" 
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
    } 
    packagingOptions { 
    exclude 'META-INF/LICENSE' 
    exclude 'META-INF/LICENSE-FIREBASE.txt' 
    exclude 'META-INF/NOTICE' 
    //exclude 'META-INF/DEPENDENCIES.txt' 
    //exclude 'META-INF/LICENSE.txt' 
    //exclude 'META-INF/NOTICE.txt' 
    //exclude 'META-INF/NOTICE' 
    //exclude 'META-INF/LICENSE' 
    //exclude 'META-INF/DEPENDENCIES' 
    //exclude 'META-INF/notice.txt' 
    //exclude 'META-INF/license.txt' 
    //exclude 'META-INF/dependencies.txt' 
    //exclude 'META-INF/LGPL2.1' 
    } 
} 

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

    compile 'com.android.support:appcompat-v7:25.0.1' 
    compile 'com.android.support:design:25.0.1' 

    //database depedency 
    compile 'com.google.firebase:firebase-core:9.8.0' 
    compile 'com.google.firebase:firebase-database:9.8.0' 
    compile 'com.firebase:firebase-client-android:2.4.1' 
    compile 'com.firebase:firebase-client-parent:2.5.2' 
} 

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

dependencies { 
    classpath 'com.android.tools.build:gradle:2.2.2' 
    classpath 'com.google.gms:google-services:3.0.0' 
} 

答えて

0

あなたのコードにつきservices.asはGoogle Playせずに作業をいけないウル別emulator.firebaseでGoogle Playのサービスを有効にしてみてください----固定それに私にいくつかの方法を教えてください。この試してみてください。 プロジェクトレベルのビルドファイルを

アプリレベルのビルドの
buildscript { 
repositories { 
    jcenter() 
} 
dependencies { 
    classpath 'com.android.tools.build:gradle:2.2.0' 
    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 
} 

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 24 
    buildToolsVersion "24.0.2" 
    defaultConfig { 
     applicationId "com.example.mrnobody.firebasetutorial" 
     minSdkVersion 16 
     targetSdkVersion 24 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner   "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 


     packagingOptions { 
      exclude 'META-INF/DEPENDENCIES' 
      exclude 'META-INF/NOTICE' 
      exclude 'META-INF/LICENSE' 
      exclude 'META-INF/LICENSE.txt' 
      exclude 'META-INF/NOTICE.txt' 

    } 
} 

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:24.2.1' 
    testCompile 'junit:junit:4.12' 
    compile 'com.google.firebase:firebase-database:9.0.2' 
    compile 'com.google.firebase:firebase-crash:9.0.2' 
    compile 'com.google.firebase:firebase-auth:9.0.2' 
    compile 'com.firebase:firebase-client-android:2.5.2' 
} 
apply plugin: 'com.google.gms.google-services' 
関連する問題