mym0404 / react-native-kakao

🟡 Kakao SDK All-In-One Solution Supports Android, iOS, Web, New architecture, Old Architecture, Expo
https://rnkakao.dev
MIT License
56 stars 1 forks source link

[BUG]: Could not find com.kakao.sdk:v2-* #41

Closed tinker-dev-monk closed 2 weeks ago

tinker-dev-monk commented 1 month ago

Is there an existing issue for this?

Name, Version of @react-native-kakao/*

core/2.2.5, user/2.2.5

Version of react-native

0.74.4

What os are you seeing the problem on?

Android

What device types are you seeing the problem on?

Physcial Device

What architecture types of react native are you seeing the problem on?

Old Architecture(Bridge), New Architecture(Fabric)

Version of device(android API, iOS OS version, etc...)

Android 33

Expo App

What happened?

I liked your project and tried to apply it, but I got the error below.

Could not find com.kakao.sdk:v2-*

When I init a new project to check, I get an error. Kakao SDK is not found and won't build. Both old and new will throw an error.

Works great on iOS

<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
      ...
      >
      <activity
        android:name=".MainActivity"
        ...
        >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <!-- KAKAO SIGN -->
      <activity
        android:name="com.kakao.sdk.auth.AuthCodeHandlerActivity"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:host="oauth"
                  android:scheme="kakao{NATIVE_KEY}" />
        </intent-filter>
      </activity>
    </application>
</manifest>
buildscript {
    ext {
        buildToolsVersion = "34.0.0"
        minSdkVersion = 23
        compileSdkVersion = 34
        targetSdkVersion = 34
        ndkVersion = "26.1.10909125"
        kotlinVersion = "1.9.22"
    }
    repositories {
        google()
        mavenCentral()
        maven { url "https://devrepo.kakao.com/nexus/content/groups/public/" }
    }
    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"

Relevant a package.json.

{
  "name": "newArc",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest",
  },
  "dependencies": {
    "@react-native-kakao/core": "^2.2.5",
    "@react-native-kakao/user": "^2.2.5",
    "react": "18.2.0",
    "react-native": "0.74.4"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/babel-preset": "0.74.86",
    "@react-native/eslint-config": "0.74.86",
    "@react-native/metro-config": "0.74.86",
    "@react-native/typescript-config": "0.74.86",
    "@types/react": "^18.2.6",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-test-renderer": "18.2.0",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  },
  "packageManager": "yarn@3.6.4"
}

Relevant log output

$ yarn android

info A dev server is already running for this project on port 8081.
info Installing the app...
5 actionable tasks: 1 executed, 4 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.kakao.sdk:v2-common:2.20.1.
     Searched in the following locations:
       - https://oss.sonatype.org/content/repositories/snapshots/com/kakao/sdk/v2-common/2.20.1/v2-common-2.20.1.pom
       - https://repo.maven.apache.org/maven2/com/kakao/sdk/v2-common/2.20.1/v2-common-2.20.1.pom
       - file:/Users/lee/Desktop/newArc/node_modules/jsc-android/dist/com/kakao/sdk/v2-common/2.20.1/v2-common-2.20.1.pom
       - https://dl.google.com/dl/android/maven2/com/kakao/sdk/v2-common/2.20.1/v2-common-2.20.1.pom
       - https://www.jitpack.io/com/kakao/sdk/v2-common/2.20.1/v2-common-2.20.1.pom
     Required by:
         project :app > project :react-native-kakao_core
   > Could not find com.kakao.sdk:v2-user:2.20.1.
     Searched in the following locations:
       - https://oss.sonatype.org/content/repositories/snapshots/com/kakao/sdk/v2-user/2.20.1/v2-user-2.20.1.pom
       - https://repo.maven.apache.org/maven2/com/kakao/sdk/v2-user/2.20.1/v2-user-2.20.1.pom
       - file:/Users/lee/Desktop/newArc/node_modules/jsc-android/dist/com/kakao/sdk/v2-user/2.20.1/v2-user-2.20.1.pom
       - https://dl.google.com/dl/android/maven2/com/kakao/sdk/v2-user/2.20.1/v2-user-2.20.1.pom
       - https://www.jitpack.io/com/kakao/sdk/v2-user/2.20.1/v2-user-2.20.1.pom
     Required by:
         project :app > project :react-native-kakao_user

* 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 5s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. > Could not find com.kakao.sdk:v2-common:2.20.1. Searched in the following locations: - https://oss.sonatype.org/content/repositories/snapshots/com/kakao/sdk/v2-common/2.20.1/v2-common-2.20.1.pom - https://repo.maven.apache.org/maven2/com/kakao/sdk/v2-common/2.20.1/v2-common-2.20.1.pom - file:/Users/lee/Desktop/newArc/node_modules/jsc-android/dist/com/kakao/sdk/v2-common/2.20.1/v2-common-2.20.1.pom - https://dl.google.com/dl/android/maven2/com/kakao/sdk/v2-common/2.20.1/v2-common-2.20.1.pom - https://www.jitpack.io/com/kakao/sdk/v2-common/2.20.1/v2-common-2.20.1.pom Required by: project :app > project :react-native-kakao_core > Could not find com.kakao.sdk:v2-user:2.20.1. Searched in the following locations: - https://oss.sonatype.org/content/repositories/snapshots/com/kakao/sdk/v2-user/2.20.1/v2-user-2.20.1.pom - https://repo.maven.apache.org/maven2/com/kakao/sdk/v2-user/2.20.1/v2-user-2.20.1.pom - file:/Users/lee/Desktop/newArc/node_modules/jsc-android/dist/com/kakao/sdk/v2-user/2.20.1/v2-user-2.20.1.pom - https://dl.google.com/dl/android/maven2/com/kakao/sdk/v2-user/2.20.1/v2-user-2.20.1.pom - https://www.jitpack.io/com/kakao/sdk/v2-user/2.20.1/v2-user-2.20.1.pom Required by: project :app > project :react-native-kakao_user * 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 5s.
info Run CLI with --verbose flag for more details.

Reproducible Sample Repository

https://github.com/mym0404/react-native-kakao/

Code of Conduct

GyeongChan-Jang commented 3 weeks ago

I got same issue..

SID12g commented 3 weeks ago
// android/build.gradle

buildscript {
    ext {
        buildToolsVersion = "34.0.0"
        minSdkVersion = 23
        compileSdkVersion = 34
        targetSdkVersion = 34
        ndkVersion = "26.1.10909125"
        kotlinVersion = "1.9.24"
    }
    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")
    }
}

allprojects {
    repositories {
        maven {
            url "https://devrepo.kakao.com/nexus/content/groups/public/"
        }
    }
}

apply plugin: "com.facebook.react.rootproject"
cd android                                             
./gradlew clean

try this

https://rnkakao.dev/docs/install-android

mym0404 commented 3 weeks ago

Issue template requires minimum reproducing sample for tracking issue properly, but it seems more likely build problem mentioned above.