Android Studio Notification-Kanal können nicht importiert werden

Ich untersuchte die FB-messaging-Funktionen für android und überprüft eine Probe-Projekt über es. Wenn ich schrieb den code meiner app importieren können, Notification Manager, aber es kann nicht importieren Notification-Kanal. Mein gradle-Datei finden Sie unten.

import android.app.NotificationChannel;
import android.app.NotificationManager;

Mein gradle dependencies

  compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:support-compat:25.0.0-beta2'
    compile 'com.android.support:design:25.3.1'
   compile 'com.android.support:support-v4:25.3.1'
    compile 'com.android.support:support-v13:25.3.1'
 compile 'com.google.android.gms:play-services:11.0.2'
    compile 'com.google.firebase:firebase-messaging:11.0.2'
    compile 'com.google.firebase:firebase-core:11.0.2

Abhängigkeiten von google ' s Projekt.

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:26.0.0-beta2'
    compile 'com.android.support:animated-vector-drawable:26.0.0-beta2'
    compile 'com.android.support:support-compat:26.0.0-beta2'

    compile 'com.google.firebase:firebase-messaging:11.0.1'
    compile 'com.firebase:firebase-jobdispatcher:0.6.0'

    //Testing dependencies
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
    androidTestCompile 'com.android.support.test:runner:0.5'
    androidTestCompile 'com.android.support:support-annotations:25.3.1'
}

Verbindung zu den google-code : https://github.com/firebase/quickstart-android/blob/master/messaging/app/build.gradle
'

Edit: Alle von gradle-Datei.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.3'
    defaultConfig {
        applicationId 'com.myapp.extranet'
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }


}




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'
    })
    compile 'com.iarcuschin:simpleratingbar:0.1.5'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:support-compat:25.0.0-beta2'
    compile 'com.android.support:design:25.3.1'
    compile 'com.intuit.sdp:sdp-android:1.0.3'
    compile 'com.google.code.gson:gson:2.7'
    compile 'com.mcxiaoke.volley:library:1.0.19'
    compile 'de.hdodenhof:circleimageview:1.2.1'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.android.support:support-v4:25.3.1'
    compile 'com.android.support:support-v13:25.3.1'
    compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
    compile 'com.miguelcatalan:materialsearchview:1.4.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
    compile 'com.github.clans:fab:1.6.4'
    compile 'com.joooonho:selectableroundedimageview:1.0.1'
    compile 'com.github.baoyachi:StepView:1.9'
    compile 'com.google.android.gms:play-services:11.0.2'
    compile 'com.google.firebase:firebase-messaging:11.0.2'
    compile 'com.google.firebase:firebase-core:11.0.2'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
  • Können Sie zeigen Sie Ihre app zu bauen.gradle-Datei?
  • Ok,ich bin einfügen alle meine gradle aber es wird einige unnötige Dinge
InformationsquelleAutor Cem | 2017-07-21
Schreibe einen Kommentar