“error: package android.support.v4.content does not exist”
See original GitHub issueDescription 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:
- Created 4 years ago
- Reactions:8
- Comments:28 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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