Java Android Studio Error

Error

The minCompileSdk (31) specified in a dependency’s AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module’s compileSdkVersion (android-30). Dependency: androidx.lifecycle:lifecycle-runtime:2.4.0. AAR metadata file: C:\Users\jaisw.gradle\caches\transforms-3\55824bd6c9b41f557d64668e082ada18\transformed\lifecycle-runtime-2.4.0\META-INF\com\android\build\gradle\aar-metadata.properties.

The solution is in the error itself. There can be two solutions:

Before

Use Android SDK version 31 in your project. Find compileSdkVersion 30 in your app\build.gradle file, and change it to compileSdkVersion 31.
Force gradle to use an older version of the dependency androidx.lifecycle:lifecycle-process:2.4.0. If you are not directly using this dependency, force gradle to use an older version like this:

After

Thank You!

原文链接:Java Android Studio Error

© 版权声明
THE END
喜欢就支持一下吧
点赞8 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容