2016-12-20 1 views
0

----- Es funktioniert nicht am Telefon ... aber stil arbeiten in Nox Emulator, Tabs ... nach der Installation App Stop ... Show Leider App hat gestoppt ... I hinzugefügt json Datei auch und Fingerabdruck (SH1) ... Wie repariere ich es? arbeitet nicht ohne Google Play services.as pro Code Bitte geben Sie mir einen Weg, um es fest ----Android App Stop nach Firebase Integration

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' 
} 

Antwort

0

versuchen google-Play-Dienste in ur anderen emulator.firebase ermöglichen versuchen, diese: Projektebene Build-Datei

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 
} 

für App-Ebene zu bauen:

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' 
Verwandte Themen