HMS-Core / hms-react-native-plugin

This repo contains all of React-Native HMS plugins.
https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1
Apache License 2.0
235 stars 67 forks source link

react-native-cli compilation error #261

Closed HardSLL closed 6 months ago

HardSLL commented 1 year ago

Hello. I try build react-native app, but when compiling this error image

build.gradle buildscript { ext { buildToolsVersion = "33.0.0" minSdkVersion = 21 compileSdkVersion = 33 targetSdkVersion = 33

    // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
    ndkVersion = "23.1.7779620"
}
repositories {
    google()
    mavenCentral()
    maven {url 'https://developer.huawei.com/repo/'}
}
dependencies {
    classpath("com.android.tools.build:gradle:7.3.1")
    classpath("com.facebook.react:react-native-gradle-plugin")
}

}

Help me figure out this question, what am I doing wrong?

i01000101 commented 1 year ago

Hello @HardSLL, you also need to add maven { url 'https://developer.huawei.com/repo/' } to "repositories" block in "allprojects" block of your build.gradle file.

You can follow all of the integration steps in our guide document.

Thanks for your interest.