简体   繁体   English

如何修复此错误,当我尝试从 react-native 项目构建.apk 时发生

[英]how to fix this error, its happen whene i'm trying to build .apk from react-native project

this is the error that i'm getting whene i'm trying to build.apk with ./gradlew assembleDebug commande in my android directory from react-native project thanks for any suggestions and help这是我在尝试从react-native项目的android目录中使用./gradlew assembleDebug命令构建.apk 时遇到的错误,感谢您的任何建议和帮助

* What went wrong:
A problem occurred evaluating project ':@react-native-community_masked-view'.
> No signature of method: build_9xydcf3yl2vrrdybqldni6i35.android() is applicable for argument types: (build_9xydcf3yl2vrrdybqldni6i35$_run_closure1) values: [build_9xydcf3yl2vrrdybqldni6i35$_run_closure1@161d1d4]

and my build.gradle looks like this:我的build.gradle看起来像这样:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = 30
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:4.1.0")

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        google()
        jcenter()
        maven { url 'https://www.jitpack.io' }
    }
}

i don't know what is went wrong, any help is welcome我不知道出了什么问题,欢迎任何帮助

Please provide buildToolsVersion value as string instead of the number in./build.gradle file buildToolsVersion='28.0.0' instead of buildToolsVersion=28请提供 buildToolsVersion 值作为string而不是 ./build.gradle 文件中的number buildToolsVersion='28.0.0'而不是buildToolsVersion=28

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM