Skip to content

Kotlin support #141

@DimitrisTzimikas

Description

@DimitrisTzimikas

To make it work on newest React Native 0.73 that updated Android files to Kotlin this line needs to be added in android/app/src/main/java/com/YOUR_APPLICATION_NAME/MainApplication.kt

// Ultimate Config: https://github.com/maxkomarychev/react-native-ultimate-config/blob/master/docs/quickstart.md
import com.reactnativeultimateconfig.UltimateConfigModule

and then inside class MainApplication

    override fun onCreate() {
        super.onCreate()
        SoLoader.init(this, false)
        if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
            // If you opted-in for the New Architecture, we load the native entry point for this app.
            load()
        }
        ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)

        // Ultimate Config: https://github.com/maxkomarychev/react-native-ultimate-config/blob/master/docs/quickstart.md
        UltimateConfigModule.setBuildConfig(BuildConfig::class.java)
    }
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions