cannot resolve symbol for v4 media and app classes

error: package android support-v4 content does not exist
error: package android support-v4 util does not exist
androidx support library

I'm trying to import the following classes for my media player, but my app does not recognize them:

import android.support.v4.media.MediaMetadataCompat;
import android.support.v4.media.session.MediaControllerCompat;
import android.support.v4.media.session.MediaSessionCompat;
import android.support.v7.app.NotificationCompat;

I've tried as others suggested (File->Invalidate Caches/restart), but the error remains.

gradle:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    implementation 'com.android.support:recyclerview-v7:28.0.0-rc02'
    implementation 'com.android.support:cardview-v7:28.0.0-rc02'
    implementation 'com.android.support:design:28.0.0-rc02'
    implementation group: 'com.google.code.gson', name: 'gson', version: '2.7', changing: true
}

java - cannot resolve symbol for v4 media and app classes, Add this dependencies to your gradle ; com.android.support:support-v4:​YOUR_VERSION. in long way ;. Project Structure --> Dependencies  Notification style for media playback notifications. In the expanded form, up to 5 actions specified with #addAction(int, CharSequence, PendingIntent) addAction will be shown as icon-only pushbuttons, suitable for transport controls. The Bitmap given to #setLargeIcon(android.graphics.Bitmap) setLargeIcon() will be treated as album artwork.

Just Add Dependencies in our Gradle File

dependencies {
    ......
implementation 'com.android.support:support-v4:VERSION'
    .....
}

Ex

dependencies {
        ......
    implementation 'com.android.support:support-v4:27.0.1'
        .....
    }

How to solve the error 'Cannot Resolve Symbol' in Android Studio , 4 Answers. Anirudh Anantharamakrishnan, Android app developer at TCS You need to declare it globally not locally so that the whole class members Make the AnimationDrawable object global in order to rectify your resolve symbol error. #Edit: it seems that importing the android.support.v4.media.app.NotificationCompat.MediaStyle isn't necessary, so we only have to change the setStyle part. However, although the notification is shown, the notifications actions are not working.

For android x based projects, add this

implementation 'androidx.legacy:legacy-support-v4:1.0.0'

'Cannot resolve symbol' for the classes in the same package : IDEA , Idea says 'Cannot resolve symbol' on the classes from same package. integration tests because it works from the command line: grails test-app -​integration Same issue in IntelliJ IDEA 9.0.4 on Mac OS 10.6. Press ⇥ to complete first item. All generated binding classes inherit from the ViewDataBinding class. A binding class is generated for each layout file. By default, the name of the class is based on the name of the layout file, converting it to Pascal case and adding the Binding suffix to it.

Can not resolve symbol/resource in Android project – IDEs Support , Gradle project with 4 modules: java library, android library, android I have layout (xml) in res/layout directory and java class, where uses that layout. All works. Now goto 'Project tool window', select xml with layout and press ctrl + c, then of new fragment and watch red highlight (Cannot resolve symbol) There was a dropbox chooser plugin, which was very old, and it had v4 jar file. It was over writing the latest updated v4 support. The older version of push plugin worked with it as it is a 1.5 yr old app. After I replaced that v4 jar with the latest one from sdk, the build went through and I got my apk file.

How to Fix: cannot resolve symbol error in Android Studio, sonzerolee changed the title Cannot resolve symbol 'GlideApp' and '​GlideRequests' Cannot Can not find GlideApp Class in glide 4.0? In my case I am using Android Studio 3.0 beta2 in app build.gradle I have Now you can press CTRL+F9 OR you can click on Make Project option in Build menu. notification_media_action. public static int: notification_media_cancel_action. public static int: notification_template_big_media. public static int: notification_template_big_media_custom. public static int: notification_template_big_media_narrow. public static int

Cannot resolve symbol 'GlideApp' · Issue #1939 · bumptech/glide , Help Request: IntelliJ IDEA 'Cannot resolve symbol' error for standart Java classes #8625. Closed. Artyom-Ganev opened this issue on Mar 11, 2018 · 5  androidx.mediarouter.media androidx.navigation Navigation is a framework for navigating between 'destinations' within an Android application that provides a consistent API whether destinations are implemented as Fragments , Activities , or other components.

Comments
  • android.support package is in your gradle ?
  • @drowny I've posted my dependencies. Also, compile/targetSdkVersion is 28 and minSdkVersion is 15 if that matters