软件包notificationcompat不存在

时间:2018-07-28 20:00:49

标签: java android

当我尝试运行我的应用程序时出现此错误:

 - error: cannot find symbol Class NotificationCompat 
 - error: package NotificationCompat does not exist
 - error: package NotificationCompatdoes not exist

Build.gradle

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion "27.0.3"

    defaultConfig {
        applicationId "com.kingdov.Instagram_repost_downloader_pro"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

allprojects {
    gradle.projectsEvaluated {
        tasks.withType(JavaCompile) {
            options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
        }
    }
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.parse.bolts:bolts-android:1.4.0'
    implementation 'com.parse:parse-android:1.17.3'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.android.support:preference-v7:27.1.1'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.mani:ThinDownloadManager:1.2.2'
    implementation 'com.google.android.gms:play-services-ads:15.0.1'
    implementation 'net.rdrei.android.dirchooser:library:3.2@aar'
    implementation 'com.facebook.android:audience-network-sdk:4.26.0'
}

1 个答案:

答案 0 :(得分:0)

添加此

implementation 'com.android.support:support-compat:27.1.1'