SplashScreen踩到的坑

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

猜你喜欢

转载自blog.csdn.net/Duker_tec/article/details/123087004