question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

“error: package android.support.v4.content does not exist”

See original GitHub issue

Description of the problem: When trying to build the SDK with Android Studio on Mac I get: “error: package android.support.v4.content does not exist”

Affected platform

  • Android

OS of the development machine

  • macOS

Other information: The build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath 'com.google.gms:google-services:4.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Capacitor version: 1.0.0

node version: v12.1.0 npm version: 6.9.0

CocoaPods version: It’s Android that’s giving issues

Steps to reproduce: Probably a bug in my system, so don’t know how to reproduce it somewhere else.

Link to sample project: Don’t have it

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:28 (4 by maintainers)

github_iconTop GitHub Comments

37reactions
yogeshpatil143commented, Dec 24, 2019

Hi All,

Please install below plugin , it’s 100% working.

if Ionic 3/4 any.

ionic cordova plugin add cordova-plugin-androidx-adapter

Normal cordova

cordova plugin add cordova-plugin-androidx-adapter

36reactions
deborahjamescommented, Jun 2, 2020

SOLUTION TO error: package android.support.v4.content does not exist import android.support.v4.content.FileProvider;

using jetify helped to solve .

from @ jcesarmobile’ s post — >https://github.com/ionic-team/capacitor/pull/2832

Error: “package android.support.* does not exist” This error occurs when some Cordova or Capacitor plugin has old android support dependencies instead of using the new AndroidX equivalent. You should report the issue in the plugin repository so the maintainers can update the plugin to use AndroidX dependencies.

As workaround you can also patch the plugin using jetifier

npm install jetifier npx jetify npx cap sync android

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: “error: package android.support.v4.content does not exist ...
Current Behavior. error: package android.support.v4.content does not exist ... error: package android.support.v4.content does not exist
Read more >
Android "error: package android.support.v4.content does not ...
Ionic + Fastlane | Android "error: package android.support.v4.content does not exist" · 2. I am not an expert in Fastlane for Android or...
Read more >
Error: package android.support.v4.content does not exist
When I want to build this app I keep getting the following errors: error: package android.support.v4.content does not exist public class ...
Read more >
error: package android.support.v4.content does not exist ...
error: package android.support.v4.content does not exist import android.support.v4.content.FileProvider; ^. JenniferOwlOwl. import androidx.core.content.
Read more >
Moodle in English: Struggling to build
... error: package android.support.v4.content does not exist public class FileProvider extends android.support.v4.content.FileProvider {
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found