AAPT: error: attribute android:android.support.v7.widget not found.
时间: 2024-01-21 15:16:30 浏览: 107
The error message indicates that there is no attribute called "android.support.v7.widget" in your Android project. This attribute was commonly used in older versions of Android and has been replaced with "androidx.appcompat.widget" in newer versions.
To fix the error, you need to replace all occurrences of "android.support.v7.widget" with "androidx.appcompat.widget" in your project's XML files. You can do this manually or by using the "Refactor" option in Android Studio.
Also, make sure that you have added the necessary dependencies for the AppCompat library in your project's build.gradle file. You can add the following lines to the dependencies section of your build.gradle file to use the latest version of AppCompat:
```
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
```
After making these changes, clean and rebuild your project to ensure that the changes are applied correctly.
阅读全文