Could not find aapt2-proto.jar

前端 未结 7 1482
攒了一身酷
攒了一身酷 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:24

    I changed the order of this file: android/build.gradle

    For me is working with this order:

    buildscript {
        ext {
            buildToolsVersion = "27.0.3"
            minSdkVersion = 16
            compileSdkVersion = 27
            targetSdkVersion = 26
            supportLibVersion = "27.1.1"
        }
        repositories {
            google()        
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.2.1'
        }
    }
    
    allprojects {
        repositories {
            mavenLocal()
            google()
            jcenter()
            maven {
              url "$rootDir/../node_modules/react-native/android"
            }        
        }
    }
    
    task wrapper(type: Wrapper) {
        gradleVersion = '4.4'
        distributionUrl = distributionUrl.replace("bin", "all")
    }
    

提交回复
热议问题