braze-inc / braze-react-native-sdk

Public repo for the Braze React Native SDK
https://www.braze.com
Other
64 stars 83 forks source link

[Bug]: Plugin with id 'kotlin-android' not found #204

Closed tusharsarkar closed 1 year ago

tusharsarkar commented 1 year ago

Which Platforms?

Android

Which React Native Version?

0.71.6

Which @braze/react-native-sdk SDK version?

4.1.0

Repro Rate

100% of the time

Steps To Reproduce

Example:

  1. Add @braze/react-native-sdk and do all the setups setups for Android and iOS.
  2. Run command npx react-native run-android

Expected Behavior

App should build successfully and app should run

Actual Incorrect Behavior

Verbose Logs

No response

Additional Information

No response

aganov commented 1 year ago

@tusharsarkar you can edit your android/build.gradle to match specs below

buildscript {
    ext {
        // ...
        kotlinVersion = "1.8.10"
        // ...
    }
    dependencies {
        // ...
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
        // ...
    }
}

and android/app/build.gradle

apply plugin: "org.jetbrains.kotlin.android"
radixdev commented 1 year ago

Yes, please see https://www.braze.com/docs/developer_guide/platform_integration_guides/react_native/react_sdk_setup/#step-2-complete-native-setup for Kotlin setup.