zoukankan      html  css  js  c++  java
  • Could not find method google() for arguments [] on repository container,rn 集成react-native-camera 出现此错误的解决方法

    (1) app/build.gradle

    android {
      compileSdkVersion 25 
      buildToolsVersion "25.0.2"
    }
    compile (project(‘:react-native-camera‘)) {
          exclude group: "com.android.support", module: ‘support-v4‘
    }

     (2)   build.grande

    buildscript {
        repositories {
            jcenter()
            google()
        }
        dependencies {
            classpath ‘com.android.tools.build:gradle:3.0.1‘
        }
    }
    
    allprojects {
        repositories {
            mavenLocal()
            jcenter()
            google()
            maven {
               url "$rootDir/../node_modules/react-native/android"
            }
            maven { url "https://jitpack.io" }
            maven { url "https://maven.google.com" }
            google()
        }
    }

     (3) gradle/wrapper/gradle-wrapper.properties

    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip

    经过以上三步,解决了我的问题。

    如果打包时出现图片检测错误 aapt

    gradle/wrapper/gradle-wrapper.properties 关闭aapt检测

    android.useDeprecatedNdk=true
    + android.enableAapt2=false
    MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
    MYAPP_RELEASE_KEY_ALIAS=my-key-alias
    MYAPP_RELEASE_STORE_PASSWORD=yangzonglong
    MYAPP_RELEASE_KEY_PASSWORD=yangzonglong
  • 相关阅读:
    Spring框架(一)-----核心理解
    vi常用编辑
    Avue使用renren-fast-vue开源脚手架工程(一)
    sqlServer触发器调用JavaWeb接口
    Linux常用别名设置
    油猴+IDM不限速下载
    Nginx配置静态web项目
    消息中间件rabbitMQ
    springboot自定义starter
    Nginx配置微信小程序 文件验证
  • 原文地址:https://www.cnblogs.com/qiyecao/p/10205270.html
Copyright © 2011-2022 走看看