关于Gradle sync failed: Could not resolve all files for configuration ':demo:androidApis'.

Gradle sync failed: Could not resolve all files for configuration ':demo:androidApis'.
			Failed to transform file 'android.jar' to match attributes {artifactType=android-mockable-jar, returnDefaultValues=false} using transform MockableJarTransform
			Cannot create mockable android.jar
			invalid entry compressed size (expected 1821 but got 1807 bytes)

AS更新后出现了一个奇怪的问题,这里记录一下我的解决方法,或许能帮到你。

解决方案:

1.修改targetSdkVersion,设置为 targetSdkVersion 28
2.修改gradle版本,gradle-4.6-all.zip
3.Fiel-setting-Android SDK中,将Android Q项给勾上,Apply
4.clean-rebuild

 

你可能感兴趣的:(android)