Skip to content

this setup is for java now the android file is converted to kotlin, can anyone share the setup for kotlin #639

Description

@nawazokz

Run react-native info in your project and share the content.

What react-native-splash-screen version are you using?

What platform does your issue occur on? (Android/iOS/Both)

Describe your issue as precisely as possible :

  1. Steps to reproduce the issue or to explain in which case you get the issue
  2. Interesting logs

Join a screenshot or video of the problem on the simulator or device?

Show us the code you are using?

Activity

  1. soadtechdev commented on Feb 25, 2024

    @soadtechdev

    @nawazokz I recommend you to use BootSplash it currently supports the new react native architecture.

  2. AkilUnik commented on Feb 27, 2024

    @AkilUnik

    package com.turtlebuddy
    import android.os.Bundle;
    import com.facebook.react.ReactActivity
    import com.facebook.react.ReactActivityDelegate
    import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
    import com.facebook.react.defaults.DefaultReactActivityDelegate
    // react-native-splash-screen >= 0.3.1

    import org.devio.rn.splashscreen.SplashScreen;

    class MainActivity : ReactActivity() {

    /**

    • Returns the name of the main component registered from JavaScript. This is used to schedule
    • rendering of the component.
      */
      override fun onCreate(savedInstanceState: Bundle?) {
      SplashScreen.show(this);
      super.onCreate(null)
      }

    override fun getMainComponentName(): String = "turtleBuddy"

    /**

    • Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
    • which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
      */
      override fun createReactActivityDelegate(): ReactActivityDelegate =
      DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
      }
  3. malyzkhan commented on Mar 24, 2024

    @malyzkhan

    Facing the Same Issue, the Splash Screen [react-native-splash-screen] is not Working, Just because of kotlin Issue,

  4. bkvaiude commented on Mar 26, 2024

    @bkvaiude

    Check the following comment, it solved the issue and the example provided for Kotlin

    #638 (comment)

  5. Netovitu commented on Mar 28, 2024

    @Netovitu

    Does anyone have an idea how to solve it? I need this fix

  6. nawazokz commented on Mar 28, 2024

    @nawazokz
    Author

    #639 (comment)
    try this solution it work for me

  7. nawazokz commented on Mar 28, 2024

    @nawazokz
    Author

    #639 (comment)
    try this solution it work for me
    just paste these line of code under
    class MainActivity : ReactActivity()
    the line is
    override fun onCreate(savedInstanceState: Bundle?) {
    SplashScreen.show(this); // add this
    super.onCreate(null)
    }

  8. huyvu23 commented on Apr 13, 2024

    @huyvu23

    #639 (comment) try this solution it work for me

    i build success but it crash when open app on android 8

  9. Cheizr commented on Jul 12, 2024

    @Cheizr

    The readme docs needs to be updated please

  10. tdammy92 commented on Jan 2, 2025

    @tdammy92

    @nawazokz @bkvaiude
    This doesnt work on android

    "react-native": "0.76.2",

  11. bkvaiude commented on Jan 3, 2025

    @bkvaiude

    @tdammy92 Please post error details

  12. tdammy92 commented on Jan 7, 2025

    @tdammy92

    @tdammy92 Please post error details

    @bkvaiude Thank you for the response, it started working after restarting my mac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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