0
我試圖使用問題與程序兼容性-V7和NotificationManagerCompat
NotificationManagerCompat.from(this).areNotificationsEnabled()
,以確定是否推送通知允許我的應用程序或沒有。
error: cannot find symbol
Log.d(TAG, "Allowed PushNotes: " + NotificationManagerCompat.from(this).areNotificationsEnabled());
^
symbol: method areNotificationsEnabled()
location: class NotificationManagerCompat
它的進口是這樣的::
import android.support.v4.app.NotificationManagerCompat;
這些都是的build.gradle有關這個部分我想:但是它並沒有與此錯誤編譯
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example"
minSdkVersion 16
targetSdkVersion 22
versionCode 10
versionName "1.9"
ndk {
abiFilters "armeabi-v7a", "x86"
}
renderscriptTargetApi 23
renderscriptSupportModeEnabled true
}
這是依賴關係:
dependencies {
compile "com.android.support:appcompat-v7:23.4.0"