Could not find aapt2-proto.jar

前端 未结 7 1464
攒了一身酷
攒了一身酷 2021-01-01 09:59

See this link (as I suspected) has the POM file and no jar.

Important Notes:

  • I am using latest version of react native ... v0.57.3 and also latest ver
7条回答
  •  温柔的废话
    2021-01-01 10:29

    It seems like AAPT2(Android Asset Packaging Tool 2) is available in Google's maven repository.

    You need to include google() under repositories in build.gradle file as shown:

    buildscript {
      repositories {
          google() // here
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.2.0-alpha12'
      }
    } 
    allprojects {
      repositories {
          google() // and here
          jcenter()
    }
    

    Take a look at this link for more in detail.

    Note: Order also matters, if jcenter() is above google() it fails.

提交回复
热议问题