Closed bibaswan-bhawal closed 2 months ago
The error you are encountering (resource android:attr/lStar not found) occurs because the lStar attribute was introduced in a newer version of Android (API 31), but your project or one of its dependencies, like mixpanel_flutter, might be using an older version of compileSdkVersion that does not support this attribute.
To resolve this issue, you need to ensure that your project is using a compileSdkVersion that is compatible with the lStar attribute.
1. Update compileSdkVersion and buildToolsVersion:
subprojects {
afterEvaluate { project ->
if (project.plugins.hasPlugin("com.android.application") ||
project.plugins.hasPlugin("com.android.library")) {
project.android {
compileSdkVersion 34
buildToolsVersion "34.0.0"
}
}
}
}
This ensures that all subprojects in your application use these versions of the SDK and build tools.
2. Clean and Rebuild the Project:
After making these changes, perform a clean and rebuild of the project to apply the new configuration:
flutter clean
flutter build apk
When trying to build an apk using the
flutter build apk
command I am getting this error, building an appbundle works fine however.