报错如下:

Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
   > Could not find com.android.support:support-v4:30.0.0.
     Required by:
         project :app

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

解决办法:

  1. # 需要在gradle.properties中添加下面两行代码

  2. # 这是因为混合支持库。通过添加这些行选择androidX作为您的支持库

  3. android.useAndroidX=true

  4. android.enableJetifier=true

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐