Error “package android.support.v7.app does not exist”

前端 未结 16 1695
-上瘾入骨i
-上瘾入骨i 2020-11-30 02:03

I am new to android development, and I have been using the command line tools to create an android project. I followed all the instructions given in the tutorial at android

相关标签:
16条回答
  • 2020-11-30 02:05

    I use:

    npx jetifier

    this fix the problem.

    ref: Cannot build Ionic App on Android once installed BackgroundGeolocation Plugin with Capacitor

    0 讨论(0)
  • 2020-11-30 02:07

    If you are using SDK 28 or higher, you need to migrate to AndroidX library.

    With Android Studio 3.2 and higher, you can migrate an existing project to AndroidX by selecting Refactor > Migrate to AndroidX from the menu bar.

    0 讨论(0)
  • 2020-11-30 02:11

    For what it's worth:

    I ran in to this issue when using Xamarin, even though I did have the Support packages installed, both the v4 and the v7 ones.

    It was resolved for me by doing Build -> Clean All.

    0 讨论(0)
  • 2020-11-30 02:13

    If your app is AndroidX, This response may apply to your problem:

    npm install --save-dev jetifier
    npx jetify (may take a while)
    npx react-native run-android
    
    0 讨论(0)
  • 2020-11-30 02:14

    Using Android Studio you have to add the dependency of the support library that was not indicated in the tutorial

    dependencies {
    
        implementation 'com.android.support:appcompat-v7:22.0.0'
    }
    
    0 讨论(0)
  • 2020-11-30 02:15

    Your project is missing the support library from the SDK.

    If you have no installed them, just right click on the project > Android Tools > Install support library.

    Then, just import into workspace, as an Android project, android-support-v7-appcompat, located into ${android-sdk-path}/extras/android/support/v7

    And finally, right click in the Android project > Properties > Android Tab. Push the Add button and add the support project "android-support-v7-appcompat" as dependency.

    Clean your project and the must compile and work properly.

    0 讨论(0)
提交回复
热议问题