1,values-v31.xml:5: error: style attribute 'android:attr/windowSplashScreenBac
是因为SplashScreen是android12中加入的,所以需指定android12版的SdkVersion
解决办法:targetSdkVersion升到31
targetSdkVersion 31
对应的 compileSdkVersion 31
2,unrecognized Attribute name MODULE (class com.sun.tools.javac.util.UnsharedNameTabl
这是升级targetSdkVersion 31所导致的问题,应该是android12需要至少JDK11
解决办法:
Path to update your gradle jdk in AS Arctic Fox:
Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK
Select 11 and build should be successful.
来源:https://stackoverflow.com/questions/68344424/unrecognized-attribute-name-module-class-com-sun-tools-javac-util-sharednametab
博客介绍了在Android开发中遇到的两个问题:1) 引入SplashScreen导致的android:attr/windowSplashScreenBackground错误,解决方法是将targetSdkVersion提升到31并匹配compileSdkVersion;2) 升级targetSdkVersion到31后出现的unrecognizedAttribute 'module'错误,解决方案是更新Gradle JDK至11。按照提供的步骤设置后,构建应能成功。
1357

被折叠的 条评论
为什么被折叠?



