zoukankan      html  css  js  c++  java
  • react-native 解决Could not find method android() for arguments问题

    运行命令行:react-native run-android  报错

    Error:(23, 0) Could not find method android() for arguments [****] on root project '****' of type org.gradle.api.Project.



    最终解决方案:打开项目gradle目录如下:
    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.2.2'
            classpath 'com.novoda:bintray-release:0.3.4'
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    allprojects {
        repositories {
            jcenter()
        }
    }
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    android {
        compileSdkVersion 23
        buildToolsVersion '23.0.3'
    }
    dependencies {
    }

    将其中的

    android {
        compileSdkVersion 23
        buildToolsVersion '23.0.3'
    }
    
    

    删除或注释掉后重新编译通过。 

  • 相关阅读:
    优先队列
    BFS和图的最短路径 279,127,126
    opencv常用函数
    图形图像概念
    缓存
    主板
    显卡
    cpu
    vs配置opencv(只需一次)
    附加依赖项、库目录、包含目录
  • 原文地址:https://www.cnblogs.com/winyh/p/6972807.html
Copyright © 2011-2022 走看看