I'm updating an app, to add Android 8+ support, I was trying to get the app Notifications to work properly (using the now required Channels), but for some reason I can't use the new NotificationCompat.Builder constructor (Context, String).
I've already updated my buildToolsVersion (28.0.3 at the moment), as seen here, yet I'm still unable to use the new constructor.
//IDE won't let me use:
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, "channelId");
//While this works fine:
NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
Any ideas on why this could be happening? I already tried to find a solution, but most of them just tell you to update the buildToolsVersion.
Relevant build.gradle code:
android {
compileSdkVersion 27
buildToolsVersion '28.0.3'
defaultConfig {
...
minSdkVersion 16
targetSdkVersion 27
...
}
dependencies {
...
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
...
}