Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank Screen Appears When Starting Navigation #409

Open
Abubaker006 opened this issue Feb 20, 2025 · 0 comments
Open

Blank Screen Appears When Starting Navigation #409

Abubaker006 opened this issue Feb 20, 2025 · 0 comments
Assignees

Comments

@Abubaker006
Copy link

Abubaker006 commented Feb 20, 2025

I am using @googlemaps/react-native-navigation-sdk in my React Native project, and when I start navigation, the screen turns blank. No errors appear in the console (link to image : https://drive.google.com/file/d/1MHj6FXUOpiwEaeSGbQqPEdGIN7utdXZz/view?usp=sharing )
Its running perfectly fine in ios, while in android we already had a dependency in gradle which was :
implementation 'com.google.android.gms:play-services-maps:19.0.0'
so I got the solution for it as, how can I solve this issue ?

` implementation 'com.google.android.gms:play-services-maps:19.0.0'

   configurations {
    implementation {
        exclude group: 'com.google.android.gms', module: 'play-services-maps'
    }
}

`

To Repreduce:

  1. 1 install the package.

npm i @googlemaps/react-native-navigation-sdk

my build.gradle (app):

`apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
/**

  • This is the configuration block to customize your React Native Android app.

  • By default you don't need to apply any configuration, just uncomment the lines you need.
    /
    react {
    /
    Folders */
    // The root of your project, i.e. where "package.json" lives. Default is '..'
    // root = file("../")
    // The folder where the react-native NPM package is. Default is ../node_modules/react-native
    // reactNativeDir = file("../node_modules/react-native")
    // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
    // codegenDir = file("../node_modules/@react-native/codegen")
    // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
    // cliFile = file("../node_modules/react-native/cli.js")

    /* Variants */
    // The list of variants to that are debuggable. For those we're going to
    // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
    // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
    // debuggableVariants = ["liteDebug", "prodDebug"]

    /* Bundling */
    // A list containing the node command and its flags. Default is just 'node'.
    // nodeExecutableAndArgs = ["node"]
    //
    // The command to run when bundling. By default is 'bundle'
    // bundleCommand = "ram-bundle"
    //
    // The path to the CLI configuration file. Default is empty.
    // bundleConfig = file(../rn-cli.config.js)
    //
    // The name of the generated asset file containing your JS bundle
    // bundleAssetName = "MyApplication.android.bundle"
    //
    // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
    // entryFile = file("../js/MyApplication.android.js")
    //
    // A list of extra flags to pass to the 'bundle' commands.
    // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
    // extraPackagerArgs = []

    /* Hermes Commands */
    // The hermes compiler command to run. By default it is 'hermesc'
    // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
    //
    // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
    // hermesFlags = ["-O", "-output-source-map"]
    }

/**

  • Set this to true to enable desugaring if minSdkVersion is set to 34 or below.
  • Note that this currently affects Detox testing with release builds and therefore is not enabled by default.
    */
    def enableDesugaring = false

/**

  • Set this to true to Run Proguard on Release builds to minify the Java bytecode.
    */
    def enableProguardInReleaseBuilds = true

def enableSeparateBuildPerCPUArchitecture = true

/**

  • The preferred build flavor of JavaScriptCore (JSC)
  • For example, to use the international variant, you can use:
  • def jscFlavor = 'org.webkit:android-jsc-intl:+'
  • The international variant includes ICU i18n library and necessary data
  • allowing to use e.g. Date.toLocaleString and String.localeCompare that
  • give correct results when using with locales other than en-US. Note that
  • this variant is about 6MiB larger per architecture than default.
    */
    def jscFlavor = 'org.webkit:android-jsc:+'

android {
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

namespace "com.lockstop"
defaultConfig {
    applicationId "com.lockstop.app"
    minSdkVersion rootProject.ext.minSdkVersion
    targetSdkVersion rootProject.ext.targetSdkVersion
    versionCode 6
    versionName "1.3"
}
splits {

// Configures multiple APKs based on ABI.
abi {

  // Enables building multiple APKs per ABI.
  enable false

  // By default all ABIs are included, so use reset() and include to specify that you only
  // want APKs for x86 and x86_64.

  // Resets the list of ABIs for Gradle to create APKs for to none.
  reset()

  // Specifies a list of ABIs for Gradle to create APKs for.
  include "armeabi-v7a", "x86", "x86_64", "arm64-v8a"

  // Specifies that you don't want to also generate a universal APK that includes all ABIs.
  universalApk false
}

}
signingConfigs {
release {
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
storeFile file(MYAPP_UPLOAD_STORE_FILE)
storePassword MYAPP_UPLOAD_STORE_PASSWORD
keyAlias MYAPP_UPLOAD_KEY_ALIAS
keyPassword MYAPP_UPLOAD_KEY_PASSWORD
}
}
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.release
// minifyEnabled enableProguardInReleaseBuilds
minifyEnabled false
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
shrinkResources false
}
}
compileOptions {
coreLibraryDesugaringEnabled enableDesugaring
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

    lint {
    abortOnError false
}

}

dependencies {
// React Native and Firebase dependencies
implementation("com.facebook.react:react-android")
implementation("com.facebook.react:flipper-integration")
implementation platform("com.google.firebase:firebase-bom:32.8.1")
implementation 'com.google.firebase:firebase-core:21.0.0'
implementation 'com.google.firebase:firebase-crashlytics:18.0.0'

// React Native Maps and related dependencies
implementation 'com.google.android.gms:play-services-maps:19.0.0'
 
   configurations {
    implementation {
        exclude group: 'com.google.android.gms', module: 'play-services-maps'
    }
}


implementation project(':react-native-background-fetch')

implementation 'com.google.android.libraries.navigation:navigation:6.0.2'

// Desugar Java 8+ APIs
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.3'






// Conditional Hermes JS engine inclusion
if (hermesEnabled.toBoolean()) {
    implementation("com.facebook.react:hermes-android")
} else {
    implementation jscFlavor
}

}

project.ext.react = [
enableHermes: false,
]

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants