Reputation: 41
Hi i have problems when i try to update ( migration to andoridx, i added some pictures at the end of this post) my app, especialy in this code:
.setStyle(new android.support.v4.media.app.NotificationCompat.MediaStyle()
.setMediaSession(service.getMediaSession().getSessionToken())
.setShowActionsInCompactView(0, 1)
.setShowCancelButton(true)
.setCancelButtonIntent(stopAction));
but when i try to update this:import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
i have this in my build.grade:implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
the problem comes when i try to use androidx.appcompat:appcompat:1.0.0
because the error says:
error: cannot find symbol class NotificationCompat and in the implement section, this go in grey colorimport android.support.v4.app.NotificationCompat;
import android.support.v7.app.NotificationCompat;
and says
cannot resolve symbol NotificationCompat
I dont know how to solve this, if anyone knows, please tell me. Thanks for your time
Upvotes: 4
Views: 3386
Reputation: 179
Upvotes: 4