4

A/zygote: java_vm_ext.cc:534] JNI DETECTED ERROR IN APPLICATION: JNI GetStaticMethodID called with pending exception java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.ContextCompat" on path: DexPathList[[zip file "/data/app/packagename-fNlt_Hyr4Uv4lFVItkfrgg==/base.apk"],nativeLibraryDirectories=[/data/app/packagename-fNlt_Hyr4Uv4lFVItkfrgg==/lib/arm, /data/app/packagename-fNlt_Hyr4Uv4lFVItkfrgg==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]

 @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
            MultiDex.install(this);

    }
1

2 Answers 2

4

I've just solved an issue involving android.support.v4.content.ContextCompat by importing the following library instead:

import androidx.core.content.ContextCompat;

Sign up to request clarification or add additional context in comments.

Comments

0

If you didn't add below dependency, please add it in build.gradle(Module:app)

dependencies {
//other dependencies
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
}

To know equivalent for new Androidx Artifacts from old build artifacts, please refer the below link

https://developer.android.com/jetpack/androidx/migrate/artifact-mappings

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.