Skip to content

Android build error v0.72.6 [HMS-PUSH] #301

Open
@orhanoksuzz

Description

@orhanoksuzz

Description
When I start the project after installation, it gives a build.gradle error.

Expected behavior
It must run in dev mode. But I get a compilation error in dev mode.

Current behavior

`* What went wrong:
A problem occurred evaluating project ':app'.

Failed to apply plugin 'com.huawei.agconnect'.
com.android.tools.build:gradle is no set in the build.gradle file

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
`

Screenshots
Ekran Resmi 2023-10-30 17 49 14

Logs
`

  • What went wrong:
    A problem occurred evaluating project ':app'.

Failed to apply plugin 'com.huawei.agconnect'.
com.android.tools.build:gradle is no set in the build.gradle file

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':app'.

com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
==============================================================================

BUİLD FAILED in 2s
`

Environment

  • Platform: [e.g. React-Native]
  • Kit: [Push]
  • Kit Version ["@hmscore/react-native-hms-push": "^6.11.0-300"]
  • OS Version [Android 12 - Huawei P Smart 2019]
  • Android Studio version (if applicable) [Android Studio Giraffe | 2022.3.1 Patch 2]

build.gradle

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

buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 24
compileSdkVersion = 33
targetSdkVersion = 33
kotlinVersion = "1.9.0"
// 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")
classpath("com.facebook.react:react-native-gradle-plugin")

          classpath 'com.huawei.agconnect:agcp:1.9.1.300'
}

}

allprojects {
repositories {
maven { url 'http://developer.huawei.com/repo/';allowInsecureProtocol = true }
}
}`

app/build.gradlew

top => apply plugin: "com.huawei.agconnect"
dependencies => implementation project(':react-native-hms-push'),implementation 'com.huawei.agconnect:agconnect-core:1.9.1.300'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions