shuftipro / React-Native-SDK

6 stars 6 forks source link

Build Failure: Error Configuring :shuftipro-onsite-mobilesdk in React Native Android Project #4

Closed Kaung-Htet-Hein closed 1 month ago

Kaung-Htet-Hein commented 1 month ago

I encountered an issue when trying to build my React Native project with the shuftipro-onsite-mobilesdk module on android. Below is the error log:

error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/kaunghtethein/Developer/PublicBank/ToDoApp/node_modules/shuftipro-onsite-mobilesdk/android/build.gradle' line: 100

* What went wrong:
A problem occurred configuring project ':react-native-mmkv'.
> Could not create task ':react-native-mmkv:configureCMakeDebug[armeabi-v7a]'.
> A problem occurred configuring project ':shuftipro-onsite-mobilesdk'.
> Could not set unknown property 'classifier' for task ':shuftipro-onsite-mobilesdk:androidJavadocJar' of type org.gradle.api.tasks.bundling.Jar.

* 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.
> Get more help at https://help.gradle.org.

BUILD FAILED in 7s.

the package version is

"react-native": "0.74.3",
"shuftipro-onsite-mobilesdk": "^0.0.3",

here is android build.gradle file

buildscript {
    ext {
        buildToolsVersion = "34.0.0"
        minSdkVersion = 23
        compileSdkVersion = 34
        targetSdkVersion = 34
        ndkVersion = "23.1.7779620"
        kotlinVersion = "1.9.22"
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
    }
}

apply plugin: "com.facebook.react.rootproject"

npx react-native info

System:
  OS: macOS 14.4.1
  CPU: (8) arm64 Apple M1 Pro
  Memory: 201.38 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.10.0
    path: ~/.nvm/versions/node/v20.10.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.10.0/bin/yarn
  npm:
    version: 10.2.3
    path: ~/.nvm/versions/node/v20.10.0/bin/npm
  Watchman:
    version: 2024.07.15.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/kaunghtethein/.rvm/gems/ruby-2.7.6/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK:
    API Levels:
      - "28"
      - "31"
      - "33"
      - "34"
    Build Tools:
      - 34.0.0
      - 34.0.0
    System Images:
      - android-31 | Google Play ARM 64 v8a
      - android-34 | Google APIs Intel x86_64 Atom
      - android-34 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10300.40.2321.11567975
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.7.6
    path: /Users/kaunghtethein/.rvm/rubies/ruby-2.7.6/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.3
    wanted: 0.74.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
shuftipro commented 1 month ago

Hi @Kaung-Htet-Hein Please use the latest version of SDK 0.0.4 in which this issue is fixed.