How can i improve this modal? I tried changing the colors n spacing but it doesnt seem to look right. Are there any fonts you recommend?
Design Question: how can improve this design [closed]
How to use Google Play pre-launch report with expo / react-native
Google has a built in app crawler for the app store called the pre-launch report.
It will crawl your app on a bunch of different devices and give you some basic feedback assuming you:
- provide credentials (easy)
- provide resource IDs for username / password fields, sign-in button (hard)
It doesn't appear to be trivial to set these to be static in expo / react-native, they are dynamically generated.
Is there a smart way to set this up?
Error: constructor ModuleRegistryAdapter in class ModuleRegistryAdapter cannot be applied to given types, new ModuleRegistryAdapter()
Hello im getting the fallowing error on console:
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081/Users/user/Desktop/.../android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:82: error: constructor ModuleRegistryAdapter in class ModuleRegistryAdapter cannot be applied to given types; new ModuleRegistryAdapter(), ^ required: ReactModuleRegistryProvider found: no arguments reason: actual and formal argument lists differ in length1 errorFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:compileDebugJavaWithJavac'.> Compilation failed; see the compiler error output for details.* 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.
on android studio:
/Users/username/.../project_name/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:82: error: constructor ModuleRegistryAdapter in class ModuleRegistryAdapter cannot be applied to given types; new ModuleRegistryAdapter(), ^ required: ReactModuleRegistryProvider found: no arguments reason: actual and formal argument lists differ in length
"react-native": "~0.61.5","react-native-unimodules": "^0.9.1",
It seems a recent react-native-unimodules bug on android, any solutions?this is the same error:https://www.gitmemory.com/issue/unimodules/react-native-unimodules/58/530738183
Cannot invoke method doFirst() on null object : react.gradle
Can somebody help me.
I tried to create android dependency using a react native compiled to android studio.and I encountered some error that says : Cannot invoke method doFirst() on null object and its directing to my react.gradle file.
Here's environment specs:
Android studio build gradle version : 4.0.0distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
Here's the detailed error
FAILURE: Build failed with an exception.* Where:Script 'C:\Users\Nhick\esports-gameclient-mobile-v1.0\node_modules\react-native\react.gradle' line: 312* What went wrong:A problem occurred configuring project ':app'.> Failed to notify project evaluation listener.> Cannot invoke method doFirst() on null object> Could not get unknown property 'applicationVariants' for extension 'android' of type com.android.build.gradle.LibraryExtension.
Here's my react.gradle
// Copyright (c) Facebook, Inc. and its affiliates.// This source code is licensed under the MIT license found in the// LICENSE file in the root directory of this source tree.import org.apache.tools.ant.taskdefs.condition.Osdef config = project.hasProperty("react") ? project.react : [];def cliPath = config.cliPath ?: "node_modules/react-native/cli.js"def composeSourceMapsPath = config.composeSourceMapsPath ?: "node_modules/react-native/scripts/compose-source-maps.js"def bundleAssetName = config.bundleAssetName ?: "index.android.bundle"def entryFile = config.entryFile ?: "index.android.js"def bundleCommand = config.bundleCommand ?: "bundle"def reactRoot = file(config.root ?: "../../")def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"]def bundleConfig = config.bundleConfig ? "${reactRoot}/${config.bundleConfig}" : null ;def enableVmCleanup = config.enableVmCleanup == null ? true : config.enableVmCleanupdef hermesCommand = config.hermesCommand ?: "../../node_modules/hermes-engine/%OS-BIN%/hermes"def reactNativeDevServerPort() { def value = project.getProperties().get("reactNativeDevServerPort") return value != null ? value : "8081"}def reactNativeInspectorProxyPort() { def value = project.getProperties().get("reactNativeInspectorProxyPort") return value != null ? value : reactNativeDevServerPort()}def getHermesOSBin() { if (Os.isFamily(Os.FAMILY_WINDOWS)) return "win64-bin"; if (Os.isFamily(Os.FAMILY_MAC)) return "osx-bin"; if (Os.isOs(null, "linux", "amd64", null)) return "linux64-bin"; throw new Exception("OS not recognized. Please set project.ext.react.hermesCommand "+"to the path of a working Hermes compiler.");}// Make sure not to inspect the Hermes config unless we need it,// to avoid breaking any JSC-only setups.def getHermesCommand = { // If the project specifies a Hermes command, don't second guess it. if (!hermesCommand.contains("%OS-BIN%")) { return hermesCommand } // Execution on Windows fails with / as separator return hermesCommand .replaceAll("%OS-BIN%", getHermesOSBin()) .replace('/' as char, File.separatorChar);}// Set enableHermesForVariant to a function to configure per variant,// or set `enableHermes` to True/False to set all of themdef enableHermesForVariant = config.enableHermesForVariant ?: { def variant -> config.enableHermes ?: false}android { buildTypes.all { resValue "integer", "react_native_dev_server_port", reactNativeDevServerPort() resValue "integer", "react_native_inspector_proxy_port", reactNativeInspectorProxyPort() }}afterEvaluate { def isAndroidLibrary = plugins.hasPlugin("com.android.library") def variants = isAndroidLibrary ? android.libraryVariants : android.applicationVariants variants.all { def variant -> // Create variant and target names def targetName = variant.name.capitalize() def targetPath = variant.dirName // React js bundle directories def jsBundleDir = file("$buildDir/generated/assets/react/${targetPath}") def resourcesDir = file("$buildDir/generated/res/react/${targetPath}") def jsBundleFile = file("$jsBundleDir/$bundleAssetName") def jsSourceMapsDir = file("$buildDir/generated/sourcemaps/react/${targetPath}") def jsIntermediateSourceMapsDir = file("$buildDir/intermediates/sourcemaps/react/${targetPath}") def jsPackagerSourceMapFile = file("$jsIntermediateSourceMapsDir/${bundleAssetName}.packager.map") def jsCompilerSourceMapFile = file("$jsIntermediateSourceMapsDir/${bundleAssetName}.compiler.map") def jsOutputSourceMapFile = file("$jsSourceMapsDir/${bundleAssetName}.map") // Additional node and packager commandline arguments def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] def extraPackagerArgs = config.extraPackagerArgs ?: [] def enableHermes = enableHermesForVariant(variant) def currentBundleTask = tasks.create( name: "bundle${targetName}JsAndAssets", type: Exec) { group = "react" description = "bundle JS and assets for ${targetName}." // Create dirs if they are not there (e.g. the "clean" task just ran) doFirst { jsBundleDir.deleteDir() jsBundleDir.mkdirs() resourcesDir.deleteDir() resourcesDir.mkdirs() jsIntermediateSourceMapsDir.deleteDir() jsIntermediateSourceMapsDir.mkdirs() jsSourceMapsDir.deleteDir() jsSourceMapsDir.mkdirs() } // Set up inputs and outputs so gradle can cache the result inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) outputs.dir(jsBundleDir) outputs.dir(resourcesDir) // Set up the call to the react-native cli workingDir(reactRoot) // Set up dev mode def devEnabled = !(config."devDisabledIn${targetName}" || targetName.toLowerCase().contains("release")) def extraArgs = extraPackagerArgs; if (bundleConfig) { extraArgs = extraArgs.clone() extraArgs.add("--config"); extraArgs.add(bundleConfig); } if (Os.isFamily(Os.FAMILY_WINDOWS)) { commandLine("cmd", "/c", *nodeExecutableAndArgs, cliPath, bundleCommand, "--platform", "android", "--dev", "${devEnabled}","--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir,"--sourcemap-output", enableHermes ? jsPackagerSourceMapFile : jsOutputSourceMapFile, *extraArgs) } else { commandLine(*nodeExecutableAndArgs, cliPath, bundleCommand, "--platform", "android", "--dev", "${devEnabled}","--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir,"--sourcemap-output", enableHermes ? jsPackagerSourceMapFile : jsOutputSourceMapFile, *extraArgs) } if (enableHermes) { doLast { def hermesFlags; def hbcTempFile = file("${jsBundleFile}.hbc") exec { if (targetName.toLowerCase().contains("release")) { // Can't use ?: since that will also substitute valid empty lists hermesFlags = config.hermesFlagsRelease if (hermesFlags == null) hermesFlags = ["-O", "-output-source-map"] } else { hermesFlags = config.hermesFlagsDebug if (hermesFlags == null) hermesFlags = [] } if (Os.isFamily(Os.FAMILY_WINDOWS)) { commandLine("cmd", "/c", getHermesCommand(), "-emit-binary", "-out", hbcTempFile, jsBundleFile, *hermesFlags) } else { commandLine(getHermesCommand(), "-emit-binary", "-out", hbcTempFile, jsBundleFile, *hermesFlags) } } ant.move( file: hbcTempFile, toFile: jsBundleFile ); if (hermesFlags.contains("-output-source-map")) { ant.move( // Hermes will generate a source map with this exact name file: "${jsBundleFile}.hbc.map", tofile: jsCompilerSourceMapFile ); exec { // TODO: set task dependencies for caching // Set up the call to the compose-source-maps script workingDir(reactRoot) if (Os.isFamily(Os.FAMILY_WINDOWS)) { commandLine("cmd", "/c", *nodeExecutableAndArgs, composeSourceMapsPath, jsPackagerSourceMapFile, jsCompilerSourceMapFile, "-o", jsOutputSourceMapFile) } else { commandLine(*nodeExecutableAndArgs, composeSourceMapsPath, jsPackagerSourceMapFile, jsCompilerSourceMapFile, "-o", jsOutputSourceMapFile) } } } } } enabled config."bundleIn${targetName}" != null ? config."bundleIn${targetName}" : config."bundleIn${variant.buildType.name.capitalize()}" != null ? config."bundleIn${variant.buildType.name.capitalize()}" : targetName.toLowerCase().contains("release") } // Expose a minimal interface on the application variant and the task itself: variant.ext.bundleJsAndAssets = currentBundleTask currentBundleTask.ext.generatedResFolders = files(resourcesDir).builtBy(currentBundleTask) currentBundleTask.ext.generatedAssetsFolders = files(jsBundleDir).builtBy(currentBundleTask) // registerGeneratedResFolders for Android plugin 3.x if (variant.respondsTo("registerGeneratedResFolders")) { variant.registerGeneratedResFolders(currentBundleTask.generatedResFolders) } else { variant.registerResGeneratingTask(currentBundleTask) } variant.mergeResourcesProvider.get().dependsOn(currentBundleTask) // packageApplication for Android plugin 3.x def packageTask = variant.hasProperty("packageApplication") ? variant.packageApplicationProvider.get() : tasks.findByName("package${targetName}") if (variant.hasProperty("packageLibrary")) { packageTask = variant.packageLibrary } // pre bundle build task for Android plugin 3.2+ def buildPreBundleTask = tasks.findByName("build${targetName}PreBundle") def resourcesDirConfigValue = config."resourcesDir${targetName}" if (resourcesDirConfigValue) { def currentCopyResTask = tasks.create( name: "copy${targetName}BundledResources", type: Copy) { group = "react" description = "copy bundled resources into custom location for ${targetName}." from(resourcesDir) into(file(resourcesDirConfigValue)) dependsOn(currentBundleTask) enabled(currentBundleTask.enabled) } packageTask.dependsOn(currentCopyResTask) if (buildPreBundleTask != null) { buildPreBundleTask.dependsOn(currentCopyResTask) } } def currentAssetsCopyTask = tasks.create( name: "copy${targetName}BundledJs", type: Copy) { group = "react" description = "copy bundled JS into ${targetName}." if (config."jsBundleDir${targetName}") { from(jsBundleDir) into(file(config."jsBundleDir${targetName}")) } else { into ("$buildDir/intermediates") into ("assets/${targetPath}") { from(jsBundleDir) } // Workaround for Android Gradle Plugin 3.2+ new asset directory into ("merged_assets/${variant.name}/merge${targetName}Assets/out") { from(jsBundleDir) } // Workaround for Android Gradle Plugin 3.4+ new asset directory into ("merged_assets/${variant.name}/out") { from(jsBundleDir) } } // mergeAssets must run first, as it clears the intermediates directory dependsOn(variant.mergeAssetsProvider.get()) enabled(currentBundleTask.enabled) } packageTask.dependsOn(currentAssetsCopyTask) if (buildPreBundleTask != null) { buildPreBundleTask.dependsOn(currentAssetsCopyTask) } // Delete the VM related libraries that this build doesn't need. // The application can manage this manually by setting 'enableVmCleanup: false' // // This should really be done by packaging all Hermes releated libs into // two separate HermesDebug and HermesRelease AARs, but until then we'll // kludge it by deleting the .so files out of the /transforms/ directory. def isRelease = targetName.toLowerCase().contains("release") def libDir = "$buildDir/intermediates/transforms/" def vmSelectionAction = { fileTree(libDir).matching { if (enableHermes) { // For Hermes, delete all the libjsc* files include "**/libjsc*.so" if (isRelease) { // Reduce size by deleting the debugger/inspector include '**/libhermes-inspector.so' include '**/libhermes-executor-debug.so' } else { // Release libs take precedence and must be removed // to allow debugging include '**/libhermes-executor-release.so' } } else { // For JSC, delete all the libhermes* files include "**/libhermes*.so" } }.visit { details -> def targetVariant = ".*/transforms/[^/]*/${targetPath}/.*" def path = details.file.getAbsolutePath().replace(File.separatorChar, '/' as char) if (path.matches(targetVariant) && details.file.isFile()) { details.file.delete() } } } if (enableVmCleanup) { def task = tasks.findByName("package${targetName}") task.doFirst(vmSelectionAction) } }}
React native Flat list navigation issue
I am using the Flat list as a root container to scroll. Flatlist contains RecyclerListView in it.Each row of flat list is RecyclerListView. Each row of Flatlist does not have a fixed height. so I am using the getItemLayout to return the correct offset value.
const getItemLayout = (dat, index) => { let offset let dataItem if (index === 1) { offset = Constants.BrowseSettings.REGULAR_LAYOUT_HEIGHT + Constants.BrowseSettings.CAROUSEL_TITLE_HEIGHT dataItem = { length: getDimensions(index).height, offset, index } } else if (index === 0) { offset = 0 dataItem = { length: 0, offset, index } } else { console.log(Constants.BrowseSettings.MIXED_LAYOUT_HEIGHT + Constants.BrowseSettings.CAROUSEL_TITLE_HEIGHT) console.log(Constants.BrowseSettings.REGULAR_LAYOUT_HEIGHT + Constants.BrowseSettings.CAROUSEL_TITLE_HEIGHT) const multipleBlock = Math.floor((index - 1) / 4) const remainingBlock = (index - 1) % 4 let totalOffset = BLOCK_SIZE_OFFSET * multipleBlock if (remainingBlock > 0) { switch (remainingBlock) { case 1: totalOffset += DOUBLE_SIZE break case 2: totalOffset += DOUBLE_SIZE + REGULAR_SIZE break case 3: totalOffset += DOUBLE_SIZE + REGULAR_SIZE + REGULAR_SIZE break default: // ignore break } } totalOffset += REGULAR_SIZE dataItem = { length: getDimensions(index).height, offset: totalOffset, index } } return dataItem }
This is working fine in case of vertical downward scroll, but when i move up sometimes it causes two click to change the focus one for the bringing the item in focus and another to change the focus and scroll the full item which is in focus. How can i fix this issue?
If my first row's first item has twice the width of row below it and when i press the down button focus goes to second item of next row not the first one. Does React native has focus always right? Is there nay way to start the navigation from the Left one
Thanks
react native - play sound after notification sound
I am playing with the my app using React Native for implementation.
There is a case that after receiving a push notification (using react-native-firebase), app will play sound (using react-native-sound):
- "Hey, new music is waiting for ya". (when there is a new music)
- "Hey, new magazine is waiting for ya". (when there is a new magazine)
The thing is:
- In foreground, everything works.
- In background (background audio mode is enable), I cannot play my sound after the default push notification sound "ting". If my sound plays alone, everything works.
According to react-native-firebase
:
// index.jsimport { AppRegistry } from 'react-native';import messaging from '@react-native-firebase/messaging';import App from './App';// Register background handlermessaging().setBackgroundMessageHandler(async remoteMessage => { console.log('Message handled in the background!', remoteMessage); // ==== I play my sound here ====});AppRegistry.registerComponent('app', () => App);
If you have any suggestion, please let me know.
Thank you in advanced!
React-Native - react-native-update-gradle - Error
i had an error with my React-Native Project for Android.
My first error was the following:
I added the "react-native-location" Library. After i run the Command "react-native link", the error "compileOnly" was thrown.So my first try was, upadate NPM and Node.JS.But it wasn´t the right solution for my Problem.
After that, i had google the Error and i want to update grandle with "react-native-update-gradle". My main Problem now is, when i run the "react-native link" command, i get the following error:
C:\Computer\Apps\Projects\XXX>react-native linkScanning folders for symlinks in C:\Computer\Apps\Projects\XXX\node_modules (70ms)rnpm-install info Platform 'ios' module react-native-orientation is already linkedrnpm-install info Platform 'android' module react-native-orientation is already linkedinternal/validators.js:125 throw new ERR_INVALID_ARG_TYPE(name, 'string', value); ^TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined at validateString (internal/validators.js:125:11) at Object.join (path.js:427:7) at getSDKPath (C:\Computer\Apps\Projects\XXX\node_modules\react-native-update-gradle\index.js:13:12) at getPTPath (C:\Computer\Apps\Projects\XXX\node_modules\react-native-update-gradle\index.js:17:20) at Object.activateADB (C:\Computer\Apps\Projects\XXX\node_modules\react-native-update-gradle\index.js:5:42) at Object.<anonymous> (C:\Computer\Apps\Projects\XXX\node_modules\react-native-update-gradle\cli.js:101:6) at Module._compile (internal/modules/cjs/loader.js:734:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10) at Module.load (internal/modules/cjs/loader.js:626:32) at tryModuleLoad (internal/modules/cjs/loader.js:566:12)C:\Computer\Apps\Projects\XXX\node_modules\react-native\local-cli\core\makeCommand.js:27 throw new Error(`Error occurred during executing "${command}" command`); ^Error: Error occurred during executing "node ./node_modules/react-native-update-gradle/cli.js" command at ChildProcess.prelink (C:/Computer/Apps/Projects/XXX/node_modules/react-native/local-cli/core/makeCommand.js:27:15) at ChildProcess.emit (events.js:197:13) at maybeClose (internal/child_process.js:978:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
I tried to fix the Error, but the error is still there.
I had the following Environments
- Window 10
- React-Native 0.55.4
- React-Native-Cli 2.0.1
- NodeJS v11.9.0
- npm 4.6.0
android/build.gradle
buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' }}allprojects { repositories { mavenLocal() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } maven { url 'https://maven.google.com' } }}ext { compileSdkVersion = 28 targetSdkVersion = 28 buildToolsVersion = "28.0.3" supportLibVersion = "28.1.1" playServicesVersion = "15.0.1"}
package.json
{"name": "XXX","version": "1.0.1","private": true,"scripts": {"start": "node node_modules/react-native/local-cli/cli.js start","test": "jest","run-android": "react-native run-android" },"dependencies": {"react": "16.3.1","react-native": "0.55.4","react-native-image-slider": "^2.0.3","react-native-image-zoom-viewer": "^2.2.25","react-native-orientation": "^3.1.3","react-native-pinch-zoom-view": "^0.1.6","react-native-responsive-image": "^2.3.1","react-native-router-flux": "^4.0.0-beta.28","react-native-scrolltotop": "0.0.6","react-native-slideshow": "^1.0.1","react-native-swipe-gestures": "^1.0.2","react-native-update-gradle": "^1.1.0","react-native-vector-icons": "^4.6.0","react-native-zoom-view": "^1.0.2" },"devDependencies": {"babel-jest": "22.4.3","babel-preset-react-native": "4.0.0","jest": "22.4.3","react-test-renderer": "16.3.1" },"jest": {"preset": "react-native" }}
If you need more information to help me, please tell me that.
Thanks for your help.
Best Regards
Apk crash when Release mode but in debug mode works perfectly
I have get apk with release mode, but app crash.but apk with debug apk is not crash.this is my react-native version is "react-native": "^0.62.2" and ext { buildToolsVersion = "28.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 28 } this is my android/app/build.gradle
signingConfigs { 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://facebook.github.io/react-native/docs/signed-apk-android. signingConfig signingConfigs.debug minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } }
FontFamily React Native App overwrite with device custom font (Samsung & Oppo)
In React Native, I define font family for all text with Rubik font but for some devices (SAMSUNG & OPPO), the font looks like overwrite with a custom device font because that brand can choose a custom font for their device.
I don't know why sometimes some text looks like overwrite with custom device font & some text still uses the Rubik font.
Environment:
- OS: macOS HighSierra
- Node: 9.3.0
- Yarn: 1.3.2
- npm: 5.7.0
- Watchman: 4.9.0
Packages:
- react-native: "^0.47.2,
- react: "^16.0.0-alpha.12,
- react-native-vector-icons: ^4.4.2,
Target Platform: Android
Any ideas on how to make a device font can't overwrite the set font family font?
Task :react-native-webview:compileDebugJavaWithJavac FAILED
I keep getting this error, when I try running my React Native application after installing the react-native.webview package. Please what could I be doing wrong.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.Jetifier found 1135 file(s) to forward-jetify. Using 8 workers...info Starting JS server...info Installing the app...Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details> Task :react-native-webview:compileDebugJavaWithJavac> Task :react-native-webview:compileDebugJavaWithJavac FAILEDDeprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.Use '--warning-mode all' to show the individual deprecation warnings.See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings79 actionable tasks: 14 executed, 65 up-to-dateC:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewModule.java:276: error: cannot find symbol if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { ^ symbol: variable Q location: class VERSION_CODESNote: C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses or overrides a deprecated API.Note: Recompile with -Xlint:deprecation for details.Note: C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses unchecked or unsafe operations.Note: Recompile with -Xlint:unchecked for details.1 errorFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':react-native-webview:compileDebugJavaWithJavac'.> Compilation failed; see the compiler error output for details.* 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.orgBUILD FAILED in 1m 37serror Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewModule.java:276: error: cannot find symbol if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { ^ symbol: variable Q location: class VERSION_CODESNote: C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses or overrides a deprecated API.Note: Recompile with -Xlint:deprecation for details.Note: C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses unchecked or unsafe operations.Note: Recompile with -Xlint:unchecked for details.1 errorFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':react-native-webview:compileDebugJavaWithJavac'.> Compilation failed; see the compiler error output for details.* 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.orgBUILD FAILED in 1m 37s at makeError (C:\Projects\React-Native\FUNAI\node_modules\execa\index.js:174:9) at Promise.all.then.arr (C:\Projects\React-Native\FUNAI\node_modules\execa\index.js:278:16) at process._tickCallback (internal/process/next_tick.js:68:7)
find website's URL of mobile app which run as a web view [closed]
I download a mobile app which is run as a web view. Link to the app
I want to know the website which this app is connected on. How do I find this?
Error: Unable to determine the current character, it is not a string, number, array, or object in react-native for android
Whenever I run react-native run-android while keeping the emulator running, I get this error. react-native run-ios wroks completely fine.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081:ReactNative:Failed to parse React Native CLI configuration: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or objectThe current character read is 'E' with an int value of 69Unable to determine the current character, it is not a string, number, array, or objectline number 1index number 0Error: Invalid attribute nameLine: 16Column: 18Char: . at error (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/sax/lib/sax.js:651:10) at strictFail (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/sax/lib/sax.js:677:7) at SAXParser.write (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/sax/lib/sax.js:1313:13) at new XmlDocument (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/xmldoc/lib/xmldoc.js:261:15) at readManifest (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/@react-native-community/cli-platform-android/build/config/readManifest.js:38:10) at Object.projectConfig (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/@react-native-community/cli-platform-android/build/config/index.js:59:46) at Object.get project [as project] (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/index.js:114:50) at /Users/yashatreya/Desktop/Realyze/Realyze/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/config/config.js:8:452 at Array.forEach (<anonymous>) at _objectSpread (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/config/config.js:8:392)^FAILURE: Build failed with an exception.* Where:Script '/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 201* What went wrong:A problem occurred evaluating script.> Failed to parse React Native CLI configuration. Expected running 'npx --quiet --no-install react-native config' command from '/Users/yashatreya/Desktop/Realyze/Realyze' directory to output valid JSON, but it didn't. This may be caused by npx resolving to a legacy global react-native binary. Please make sure to uninstall any global 'react-native' binaries: 'npm uninstall -g react-native react-native-cli' and try again* 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
As indicated in the error message, I tried running npm uninstall -g react-native react-native-cli
but it didn’t work.
Info about my environment:
System: OS: macOS 10.15 CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz Memory: 29.68 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 12.13.0 - /usr/local/bin/node Yarn: 1.19.1 - /usr/local/bin/yarn npm: 6.12.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0 IDEs: Android Studio: 3.5 AI-191.8026.42.35.5977832 Xcode: 11.0/11A420a - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: ^0.61.4 => 0.61.4 npmGlobalPackages: react-native-cli: 2.0.1
android/app/build.gradle below:
apply plugin: "com.android.application"import com.android.build.OutputFileproject.ext.react = [ entryFile: "index.js", enableHermes: false, // clean and rebuild if changing]apply from: "../../node_modules/react-native/react.gradle"def enableSeparateBuildPerCPUArchitecture = falsedef enableProguardInReleaseBuilds = falsedef jscFlavor = 'org.webkit:android-jsc:+'def enableHermes = project.ext.react.get("enableHermes", false);android { compileSdkVersion rootProject.ext.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } defaultConfig { applicationId "com.realyze" minSdkVersion 21 targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" multiDexEnabled true } // rootProject.ext.minSdkVersion splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } } signingConfigs { 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://facebook.github.io/react-native/docs/signed-apk-android. signingConfig signingConfigs.debug minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } // applicationVariants are e.g. debug, release applicationVariants.all { variant -> variant.outputs.each { output -> // For each separate APK per architecture, set a unique version code as described here: // https://developer.android.com/studio/build/configure-apk-splits.html def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants output.versionCodeOverride = versionCodes.get(abi) * 1048576 + defaultConfig.versionCode } } }}dependencies { implementation project(':react-native-push-notification') implementation project(':react-native-sound') implementation project(':react-native-audio') implementation 'com.android.support:multidex:2.0.1' implementation project(':react-native-gesture-handler') implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "com.facebook.react:react-native:+" // From node_modules implementation 'androidx.appcompat:appcompat:1.1.0-rc01' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02' implementation 'com.google.firebase:firebase-analytics:17.2.0' implementation 'com.google.firebase:firebase-auth:19.1.0' implementation project(path: ":@react-native-firebase_auth") implementation project(path: ":@react-native-firebase_messaging") implementation project(path: ":@react-native-firebase_database") implementation project(':react-native-datetimepicker') implementation project(path: ":@react-native-firebase_firestore") implementation project(path: ":@react-native-firebase_functions")} if (enableHermes) { def hermesPath = "../../node_modules/hermes-engine/android/"; debugImplementation files(hermesPath +"hermes-debug.aar") releaseImplementation files(hermesPath +"hermes-release.aar") } else { implementation jscFlavor }// }// Run this once to be able to run the application with BUCK// puts all compile dependencies into folder libs for BUCK to usetask copyDownloadableDepsToLibs(type: Copy) { from configurations.compile into 'libs'}apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)apply plugin: 'com.google.gms.google-services'
android/build.gradle below :
buildscript { ext { buildToolsVersion = "28.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 28 } repositories { google() jcenter() } dependencies { classpath "com.android.tools.build:gradle:3.4.2" classpath 'com.google.gms:google-services:4.3.2' }}allprojects { repositories { mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android") } maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") } google() jcenter() maven { url 'https://jitpack.io' } }}
Initially I was getting this error: react-native build error: Could not find method implementation() for arguments [jscFlavor] on project ':app' of type org.gradle.api.Project but now I am getting the above.
How to develop Chat functionality in react native app in which user can send media files [closed]
Want to develop real time Chat/Messaging functionality in react native app. in which user can send videos,pictures,voice messages and emojis.
What are the best methods/ways/framework to achive this?
How can i set elevation shadow only on the bottom on react native
I'm trying to add a shadow on the bottom of a view, but i don't how to do it on Android. With elevation
it put a shadow also on the top. Is there a way to do it like on iOS?
Here's my code:
export function makeElevation(elevation) {const iosShadowElevation = { shadowOpacity: 0.0015 * elevation + 0.18, shadowRadius: 0.5 * elevation, shadowOffset: { height: 0.6 * elevation, },};const androidShadowElevation = { elevation,};return Platform.OS === 'ios' ? iosShadowElevation : androidShadowElevation;
}
left: iOS (expected)
right: Android
EDIT: The only solution i found is to use react-native-linear-gradient
to create a custom shadow
How do you work in team on react native projects?
I'm working in Team of 3 people and having a lot of issues with working on the same project.Different Connection.
Please Help me.
React Native IAP getProducts not working in Android
React native version: 0.62.2
react-native-iap version: 4.4.9
I am trying to create an app using react native, which provides in-app purchase functionality.For the in-app purchase, I have used an npm library react-native-iap.
async componentDidMount() { const connection = await RNIap.initConnection(); console.log(connection); if (connection) { const productList = await RNIap.getProducts(constants.productIds); this.setState({ products: productList, }); }}
This library provides a function getProducts which is used to get the list of products that are available for an in-app purchase.
The function is working fine in iOS but it returns an empty array when used for Android.I have gone through every question in StackOverflow, but couldn't find the solution to the problem.
Hence, asking this as a new question.
Any kind of help would be appreciated.
How do you delete queried data from firebase locally?
In my react native app, users are able to create and see posts (that can contain media) which are stored in Firebase's realtime database. It works correctly, however the size of the app increases greatly over time, which I assume is because more and more posts are queried and stored. Is this likely to be what causes the increased size of the app? If so, is it possible to delete such local data in the componentDidMount
function?
generated signed apk crash when Release mode but in debug mode works perfectly
Blockquote
I have get apk with generated signed release mode, but app crash.but apk with debug apk is not crash.this is my react-native version is "react-native": "^0.62.2" and ext { buildToolsVersion = "28.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 28 } this is my android/app/build.gradle
signingConfigs { 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://facebook.github.io/react-native/docs/signed-apk-android. signingConfig signingConfigs.debug minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } }
jw player chromecast with react native
How to enable cast in jwplayer in react native.jw player min version : 3.7.1in new version they are showing https://developer.jwplayer.com/jwplayer/docs/android-enable-casting-to-chromecast-devicesset cast button with external view and with menu item.when i use in native android it's working fine with using actionbar menu but in react native how can register cast button.
Note : Without Menu inflating cast not working also in native android
Sorry typo. any one have doing
How to build a digital wellbeing application in Flutter or React-Native
I want to develop an app like Digital Wellbeing or Action Dash. I want to get the total screen time of all applications, number of times phone unlocked, number of notification and stuffs like that. Is there any package to get these data from the phone? Please help me out. Thank you.