Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all 29539 articles
Browse latest View live

write ECONNRESET error during expo build:android

$
0
0

I'm pretty new to react-native and expo and I'm trying to get a standalone app to publish on the play store. When I run the command expo build:android I get an error saying "write ECONNRESET" and it just stops.

expo build:androidChecking if there is a build in progress...? Would you like to upload a keystore or have us generate one for you?If you don't know what this means, let us handle it! :) falsePublishing to channel 'default'...Building iOS bundleBuilding Android bundleAnalyzing assetsUploading assetsNo assets changed, skipped.Processing asset bundle patterns:- C:\Users\Srujan Deshpande\Desktop\Klashning\EasylibStuff\Projectv3\**\*Uploading JavaScript bundleswrite ECONNRESETSet EXPO_DEBUG=true in your env to view the stack trace.

Obfuscate entire React Native app including JavaScript code

$
0
0

How to obfuscate my react-native JS code? I have set the following in my build.gradle file:

release {      minifyEnabled true      proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" }

Here is my proguard-rules.pro file (default):

# Add project specific ProGuard rules here.# By default, the flags in this file are appended to flags specified# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt# You can edit the include path and order by changing the proguardFiles# directive in build.gradle.## For more details, see#   http://developer.android.com/guide/developing/tools/proguard.html# Add any project specific keep options here:# If your project uses WebView with JS, uncomment the following# and specify the fully qualified class name to the JavaScript interface# class:#-keepclassmembers class fqcn.of.javascript.interface.for.webview {#   public *;#}

But still after unzipping the apk I can find my JS components name, variables and url's

React-Native resets my app when it is in background

$
0
0

I'm developing a Pomodoro Timer in React-Native.

In foreground:the user interface tracks the remaining time by subtracting the arrival date minus the current date.In addition, it tracks completed cycles.(the Pomodoro tecnique states that every 4 cycles there is a long break).cycles, finish date and time remaining are used as state variables (i do use hooks) in order to update the DOM properly (and for some logic too).

In background:an alarm is set to notify the user when time is up (react-native-alarm-notification).

If the app remains in foreground all the time, it works exactly like it should. But if meanwhile I does use other apps or if I simply put my app in background, most of the times the app resets so I lose all the progress.I guess the operating system, most of the times, resets the app when it is in background mode.

So it may notify when time is up, But on the UI part, it's like the app has been launched for the first time (but in reality, it only came from background mode to foreground).Basically its state returns to default.

I'm struggling to find a solution to this.

Expo - Network Response Time Out Error (create-react-native-app) (Windows 10)

$
0
0

I have the exact same problem as here: Network Response Time Out Error (create-react-native-app) (expo). Every time I try to scan the QR code from my phone on LAN, I get the network response timeout error.

I've gone through every single response in both the linked stackoverflow post and the associated github thread: https://github.com/react-community/create-react-native-app/issues/144#issuecomment-296631692 to no avail.

Everything I've tried

  • set REACT_NATIVE_PACKAGER_HOSTNAME='my-custom-ip-address-or-hostname' with my static ip
  • disable all connections aside from my wifi (The only other connection I had to disable was "Local Area Connection 4", I didn't have virtualbox like others)
  • set my wifi connection to private
  • completely disable windows firewall
  • make exceptions to 19000, 19001, 19002 (entirely redundant given I disabled firewall, but I was desperate)
  • restart computer multiple times
  • use same network on phone as on computer
  • put the line, "android": "set REACT_NATIVE_PACKAGER_HOSTNAME={your wifi ip address} && react-native-scripts android" in my package.json

Note: A friend on the same network (also using a windows 10 laptop) got expo over LAN to work perfectly fine to his phone, so it's probably specific to my computer.

Note #2: Tunnel qr scanning works fine, but is painstakingly slow to reload so not realistic to use. Local brings me directly to "Something went wrong", no timeout error.

Android - Task :app:mergeDexRelease FAILED

$
0
0

please consider that I'm not very familiar with Android development.

Trying to generate the Android signed bundle for my React Native app, I've stumbled upon the following error:

Task :app:mergeDexRelease FAILEDD8: Program type already present: com.horcrux.svg.Brush$BrushTypecom.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.Program type already present: com.horcrux.svg.Brush$BrushType...FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:mergeDexRelease'.> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:      Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.     Program type already present: com.horcrux.svg.Brush$BrushType
  • I'm aware that BrushType is a class from react-native-svg
  • I've ran gradlew app:dependencies and found no module depending on Brush or anything related to com.horcrux.svg or react-native-svg
  • Already tried cleaning project, deleting .iml files, invalidating Android Studio caches, rebuilding, reinstalling node_modules and so on
  • Tried messing with build.gradle and gradle.properties with no luck
  • I've read through this android guide on duplicate classes also with no luck

I understand that there are 2 or more dependencies utilizing com.horcrux.svg.Brush$BrushType but I can't find them. I imagine that once I find them, I could do

implementation(:my-library) {  exclude ...}

Correct?

gradle.properties

android.useAndroidX=trueandroid.enableJetifier=trueorg.gradle.daemon=trueorg.gradle.jvmargs=-Xmx2560m

android/app/build.gradle

dependencies {    implementation project(':react-native-appearance')    implementation fileTree(dir: "libs", include: ["*.jar"])    implementation "com.facebook.react:react-native:+"  // From node_modules    implementation project(':watermelondb')    implementation project(':react-native-calendar-events')    if (enableHermes) {        def hermesPath = "../../node_modules/hermes-engine/android/";        debugImplementation files(hermesPath +"hermes-debug.aar")        releaseImplementation files(hermesPath +"hermes-release.aar")    } else {        implementation jscFlavor    }}

Thanks in advance.

React-Native with Expo - Avoid the strange behavior of the keyboard on Android

$
0
0

I wrote the code at this link for create a login/signup page in react-native using expo cli. But, how can you see (if you try the demo) when the user click on the TextInput the kayboard is opened and all the grphical components are pushed on the top. You can see a simple result in the following image:

Keyboard Behavior

The test is doing on a Huawai P20 lite.All the code is wrote using all version of the dependencies. The most important:

"dependencies": {"expo": "~37.0.3","react": "~16.9.0","react-dom": "~16.9.0","react-native": "https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz","react-native-web": "~0.11.7"},

I try to resolve the problem wrapping the all UI with the component <KeyboardAvoidingView> with all possible combination of the propsbehavior and keyboardVerticalOffset but the problem persist.I also try, before using the <KeyboardAvoidingView> wrap all into a <ScrollView> but I have always the same result.

At the last, I try to use some package that I fount on npm like:

But with all I have the same error:

Type error: is not a function

How can I prevent this strange behavior (i remember that with the old version the problem does not exist) without run expo eject and editing the AndroidManifest.xml? There is a method for map the xml file in the app.json file? Or, there is a working module that I can use for avoid the problem?

React-Native run-android app crashes immediately

$
0
0

I am pretty new to react native and try to run an app with react-native run-android so without expo. The app installs successfully but it crashes immediately without errors.I've created the app with react-native init myapp

When I try to run an app with Android Studio everything works fine. Do you have any tips for me?

Realm.objects() in react-native app return empty objects

$
0
0

I'm creating a db in realm, but when i want to consult the data with Realm.objects() return empty objects, like this: {"0":{},"1":{},"2":{}...etc}, my code is the next:

import Realm from "realm";const nombreEsquema = 'Imagen12';class Imagen {}let esquema = Imagen.schema = {   name: nombreEsquema,   properties: {      nombre: {         type: 'string'      },      uri: {         type: 'string'      },      url: {         type: 'string'      },   }};let dbRealm = Realm.open({   schema: [esquema]});functionRealm() {   dbRealm.then(realm => {      realm.write(() => {         realm.create(nombreEsquema, {            nombre: 'David',            url: 'My URL',            uri: 'My URI'         });      });      let images = realm.objects(nombreEsquema);      console.log("------------------------------");      for (let i of images) {         console.log(i);      }   });}

i read the realm's documentation but i don't see anything with that problem, my realm version is 5.0.2, and i don't know what i'm doing bad, i hope you can help me with my problem.


react-native run-android command failed, but gradlew installDebug work

$
0
0

I'm using react-native 0.43.3 on OSX.I tried to running app on Android and get message

react-native run-androidScanning 568 folders for symlinks in /Users/ruci.k/project/mayacrew/supermembers/supermembers/node_modules (5ms)JS server already running.Building and installing the app on the device (cd android && ./gradlew installDebug)...Could not install the app on the device, read the error above for details.Make sure you have an Android emulator running or a device connected and haveset up your Android development environment:https://facebook.github.io/react-native/docs/android-setup.html

./gradlew installDebug gave me some errors and fixed it all.Finally build get successed and app is working on Android device.

But react-native run-android command still not work.Only ./gradlew installDebug command work.

Is there anything can I check to use react-native run-android command?

I can't understand how could it happened.

React-native : set badge number (app icon badge) in android device when sending firebase push notification(FCM)?

$
0
0

In my react-native app, on receiving firebase notification I want to set a badge number in app icon. For IOS firebase badge parameter is working for me. How can I implement the same in android? anyone please help me

FCM plugin : react-native-firebase , Version 6

Thanks in advance

React-native app closes immediately after launching in android emulator [closed]

$
0
0

After the migrating to new react-native version in package.json when i launch my app in android emulator it closes immediately without any error or logs but works when launched in smartphone, when i downgrade the react-native back to previous version in package.json file, it works fine.

I have tried clearing cache , removing old node_modules and reinstalling it,clean build gradle file , nothing seems to work.

old react-native version: "~0.61.4"
new react-native version: "^0.62.0"

i want to store data that we get from api in asyncstorage in react native [closed]

Input react native - press in crashes application

$
0
0

When press input text to 3 seconds, show the message "Application name is stopped", how to correct this?...........................................................................................enter image description here

my component

return (<ReactNative.TextInput            ref={(ref: any) => { this.input = ref; }}            style={styleInputFormDefault}            numberOfLines={this.state.numberOfLines}            blurOnSubmit={true}            editable={this.state.editable}            underlineColorAndroid={"transparent"}            value={this.state.value}            multiline={this.state.multiline}            placeholder={this.state.placeholder}            keyboardType="default"            onChange={event => {                this.value = event.nativeEvent.text;            }}            onEndEditing={event => {                this.value = event.nativeEvent.text;                if (this.props.onChange != undefined) {                    !this.props.onChange(this.value);                }            }}            returnKeyType={this.state.returnKeyType}            onSubmitEditing={() => {                if (this.props.onSubmit != undefined) {                    this.props.onSubmit(this);                }            }}            onFocus={() => {                if (this.props.onFocus != undefined) {                    this.props.onFocus();                };            }}            onBlur={() => {                if (this.props.onBlur != undefined) {                    this.props.onBlur();                };            }}></ReactNative.TextInput>    );

React Native Android: Bouncing Scroll View

$
0
0

I know the regular scrollview on Android doesn't bounce, but I want this functionality. I am trying to use the package SpringScrollView, but when I replace my <ScrollView> components with <SpringScrollView> I receive the error

Requiring unknown module "94". If you are sure the module exists, try restarting Metro. You may also want to run 'yarn' or 'npm install'.

I don't really what Metro is, but if I just shut down the app, and rerun it using yarn install I get the same error


Update

I run into problems with the installation instructions in the documentation when I arrive at the part for MainApplication.java. The documentation specifies to modify my getPackages() function to be

@Overrideprotected List<ReactPackage> getPackages() {  return Arrays.<ReactPackage>asList(      new MainReactPackage(),      new SpringScrollViewPackage()  );}

My getPackages function for my MainApplication.java looked a little bit different

    @Override    protected List<ReactPackage> getPackages() {      List<ReactPackage> packages = new PackageList(this).getPackages();      packages.add(        new ModuleRegistryAdapter(mModuleRegistryProvider)      );      return packages;    }

So I tried to modify it to be

    @Override    protected List<ReactPackage> getPackages() {      List<ReactPackage> packages = new PackageList(this).getPackages();      packages.add(        new ModuleRegistryAdapter(mModuleRegistryProvider)      );      packages.add(new SpringScrollViewPackage());      return packages;    }

But when I do this, I receive this error when I build

error: cannot find symbol      packages.add(new SpringScrollViewPackage());                       ^  symbol: class SpringScrollViewPackage1 errorFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:compileDebugJavaWithJavac'.> Compilation failed; see the compiler error output for details.

I tried installing a version that was 0.* also, because it looks like the fancy instructions are only for the 2.* versions, but when I do that and use a SpringScrollView I get an error like

"You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports"

React native 0.61.5 Crashlytics missing libhermes.so: SoLoader.java com.facebook.soloader.SoLoader.assertInitialized

$
0
0

I am building a React-Native application, everything worked fine until I decided to upgrade from version 0.59.x to v 0.61.5.

When I try to release my app in the play store, I've got a lot of crashes reported by Firebase Crashlytics (v 6.2.0) -- even though my version is just available for internal testing, so it must be a pre-launch report triggered by playstore -- and it's exactly the same error for the exact same device =>LGE Nexus 5X with android 6.0.1.

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so       at com.facebook.soloader.SoLoader.assertInitialized(SoLoader.java)       at com.facebook.soloader.SoLoader.assertInitialized(SoLoader.java)       at com.facebook.soloader.SoLoader.assertInitialized(SoLoader.java)       at com.facebook.soloader.SoLoader.assertInitialized(SoLoader.java)       at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java)       at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java)       at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java)       at java.lang.Thread.run(Thread.java:818)

To solved this problem, I tried to submit multiple version with slightly different android configuration (for instance with and without hermes enable) but it doesn't change the end result.

Here is my build.gradle file :

apply plugin: "com.android.application"apply plugin: "io.fabric"import com.android.build.OutputFile/** * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets * and bundleReleaseJsAndAssets). * These basically call `react-native bundle` with the correct arguments during the Android build * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the * bundle directly from the development server. Below you can see all the possible configurations * and their defaults. If you decide to add a configuration block, make sure to add it before the * `apply from: "../../node_modules/react-native/react.gradle"` line. * * project.ext.react = [ *   // the name of the generated asset file containing your JS bundle *   bundleAssetName: "index.android.bundle", * *   // the entry file for bundle generation *   entryFile: "index.android.js", *  *   // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format *   bundleCommand: "ram-bundle", * *   // whether to bundle JS and assets in debug mode *   bundleInDebug: false, * *   // whether to bundle JS and assets in release mode *   bundleInRelease: true, * *   // whether to bundle JS and assets in another build variant (if configured). *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants *   // The configuration property can be in the following formats *   //         'bundleIn${productFlavor}${buildType}' *   //         'bundleIn${buildType}' *   // bundleInFreeDebug: true, *   // bundleInPaidRelease: true, *   // bundleInBeta: true, * *   // whether to disable dev mode in custom build variants (by default only disabled in release) *   // for example: to disable dev mode in the staging build type (if configured) *   devDisabledInStaging: true, *   // The configuration property can be in the following formats *   //         'devDisabledIn${productFlavor}${buildType}' *   //         'devDisabledIn${buildType}' * *   // the root of your project, i.e. where "package.json" lives *   root: "../../", * *   // where to put the JS bundle asset in debug mode *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug", * *   // where to put the JS bundle asset in release mode *   jsBundleDirRelease: "$buildDir/intermediates/assets/release", * *   // where to put drawable resources / React Native assets, e.g. the ones you use via *   // require('./image.png')), in debug mode *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", * *   // where to put drawable resources / React Native assets, e.g. the ones you use via *   // require('./image.png')), in release mode *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release", * *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to *   // date; if you have any other folders that you want to ignore for performance reasons (gradle *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ *   // for example, you might want to remove it from here. *   inputExcludes: ["android/**", "ios/**"], * *   // override which node gets called and with what additional arguments *   nodeExecutableAndArgs: ["node"], * *   // supply additional arguments to the packager *   extraPackagerArgs: [] * ] */project.ext.react = [    entryFile: "index.js",    enableHermes: false,  // clean and rebuild if changing]apply from: "../../node_modules/react-native/react.gradle"/** * Set this to true to create two separate APKs instead of one: *   - An APK that only works on ARM devices *   - An APK that only works on x86 devices * The advantage is the size of the APK is reduced by about 4MB. * Upload all the APKs to the Play Store and people will download * the correct one based on the CPU architecture of their device. */def enableSeparateBuildPerCPUArchitecture = false/** * Run Proguard to shrink the Java bytecode in release builds. */def enableProguardInReleaseBuilds = true/** * The preferred build flavor of JavaScriptCore. * * 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:+'/** * Whether to enable the Hermes VM. * * This should be set on project.ext.react and mirrored here.  If it is not set * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode * and the benefits of using Hermes will therefore be sharply reduced. */def enableHermes = project.ext.react.get("enableHermes", false);def _applicationId = System.getenv("GRADLE_APP_IDENTIFIER") ?: 'com.clothparency.debug'def appName = System.getenv("GRADLE_APP_NAME") ?: 'Clear Fashion debug'def _versionCode = (System.getenv("ANDROID_VERSION_CODE") ?: "1") as Integerdef _versionName = System.getenv("ANDROID_VERSION_NAME") ?: "1.0.0"android {    compileSdkVersion rootProject.ext.compileSdkVersion    compileOptions {        sourceCompatibility JavaVersion.VERSION_1_8        targetCompatibility JavaVersion.VERSION_1_8    }    packagingOptions {      exclude 'META-INF/androidx.exifinterface_exifinterface.version'    }    defaultConfig {        applicationId _applicationId        minSdkVersion rootProject.ext.minSdkVersion        targetSdkVersion rootProject.ext.targetSdkVersion        versionCode _versionCode        versionName _versionName        missingDimensionStrategy 'react-native-camera', 'mlkit'        multiDexEnabled true    }    dexOptions {        javaMaxHeapSize "4g"    }    splits {        abi {            reset()            enable enableSeparateBuildPerCPUArchitecture            universalApk false  // If true, also generate a universal APK            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"        }    }    signingConfigs {        release {            storeFile file(String.valueOf(System.getenv("GRADLE_KEYSTORE")))            storePassword System.getenv("GRADLE_KEYSTORE_PASSWORD")            keyAlias System.getenv("GRADLE_KEYSTORE_ALIAS")            keyPassword System.getenv("GRADLE_KEYSTORE_ALIAS_PASSWORD")        }    }    buildTypes {        debug {            resValue "string", "app_name", appName            debuggable true            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"        }        release {            resValue "string", "app_name", appName            minifyEnabled enableProguardInReleaseBuilds            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"            signingConfig signingConfigs.release        }    }    // 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            }        }    }}configurations.all {     resolutionStrategy {       force "com.facebook.soloader:soloader:0.8.1"     }}dependencies {    implementation fileTree(dir: "libs", include: ["*.jar"])    implementation "com.facebook.react:react-native:+"  // From node_modules    if (enableHermes) {      def hermesPath = "../../node_modules/hermes-engine/android/";      debugImplementation files(hermesPath +"hermes-debug.aar")      releaseImplementation files(hermesPath +"hermes-release.aar")    } else {      implementation jscFlavor    }    implementation 'com.android.support:multidex:1.0.3'}// 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 plugin: 'com.google.gms.google-services'apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

Also, my root build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {    ext {        buildToolsVersion = "28.0.3"        minSdkVersion = 16        compileSdkVersion = 28        targetSdkVersion = 28    }    repositories {        google()        jcenter()        maven {            url 'https://maven.fabric.io/public'        }    }    dependencies {        classpath('com.android.tools.build:gradle:3.5.3')        classpath 'com.google.gms:google-services:4.2.0'        classpath 'io.fabric.tools:gradle:1.+'        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}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' }    }}

Here is dependencies of my package.json:

"dependencies": {"@react-native-community/async-storage": "^1.6.1","@react-native-firebase/analytics": "^6.2.0","@react-native-firebase/app": "^6.2.0","@react-native-firebase/auth": "^6.2.0","@react-native-firebase/crashlytics": "^6.2.0","@react-native-firebase/perf": "^6.2.0","axios": "^0.18.0","fast-levenshtein": "^2.0.6","formik": "^1.5.7","i18n-js": "^3.2.2","jetifier": "^1.6.5","lodash": "^4.17.11","react": "16.9.0","react-native": "0.61.5","react-native-camera": "^3.13.1","react-native-dialog": "^5.6.0","react-native-fbsdk": "^1.1.1","react-native-formik": "^1.7.5","react-native-gesture-handler": "^1.5.2","react-native-localize": "^1.1.2","react-native-reanimated": "^1.4.0","react-native-screens": "^1.0.0-alpha.23","react-native-swiper": "^1.6.0-rc.3","react-native-tab-view": "^2.11.0","react-navigation": "3.13.0","react-navigation-tabs": "^2.6.2","react-persist": "^1.0.2","react-redux": "^7.0.3","redux": "^4.0.1","redux-devtools-extension": "^2.13.8","redux-persist": "^6.0.0","redux-thunk": "^2.3.0","reselect": "^4.0.0","unorm": "^1.6.0","yup": "^0.27.0"  }

I found this github issues talking about this topic :

But no solutions described here were worked for me.

Also found this thread on stackoverflow: React-Native :java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so : the error seems to be slightly different from mine, but solutions didn't work.

I'm afraid to release my new version into production and I'm totally stuck. Need fast help :)


Expo background location updates not working as expected

$
0
0

I wish to integrate periodic location updates and then hopefully send then to my API.

I have the following Expo snack with the code sample:

Location.startLocationUpdatesAsync(BG_TRACKING, {    accuracy: Location.Accuracy.Highest,    timeInterval: 10000}).then(() => {    console.log('Location updates started');});

The logs state:

Task BG_TRACKING is definedLocation permitted: trueLocation updates started1008 - location 1 in app state: active2895 - location 2 in app state: active

As you can see, all the permissions are set and I should be able to get more locations.After this, no location updates are given. I wish to send the location at least every minute (for intensive tracking). Even when the app is in the background. '

Any idea on how I can succeed in the above use case?

Go or Python , What should i use as backend for my (react native) app? [closed]

$
0
0

i've been juggling with an app idea and being clueless of how to build it.

a little about the app:

social network type app , users can create different directories, in those directories post images and/or text that'll be shared on a public dashboard . Directory creation is the main point of this app. Besides there'll be rooms(groups),chatting system, search operations similar to instagram

through intesive research i reached few conclusions:

  1. ReactNative over flutter ( given that i've played around web development javascript and react is my thing , even though flutter throws a good shade with widgets ,i can't afford the pain of dart)

  2. amidst my choosing backend/stack research i came across this and that was my kind-of final decision (python,aws,react native stack) (*given the fact that instagram is based on a similar structure *)

but

instagram has run into many problems with python efficiency and scalability as in this article

that made me rethink the backend and i came across this comparasion on stackshareand [this article]3 on switching from python to go

python seems to have better resources and things like [this]4 that can help (or i'm unaware of those available in Go)

which language would help glue things together,add plugins ,etc ?

note : 1.i've touched Golang and never touched python,but i'm ready to do ,learn ANYTHING(except flutter ig) to birth this app.

  1. i've never made an app before and want to get out of tutorial hell and form my ideas into apps.

3.i know c++.

4.i can explain the purpose/app idea more if it seems unclear.

  1. if you have any general guidance for app creation,links or anything ,my ears are wide open!

Intent filters does not work with activity-alias

$
0
0

Android Manifest File:

<activity    android:name=".MainActivity"    android:label="@string/app_name"    android:configChanges="keyboard|keyboardHidden|orientation|screenSize"    android:screenOrientation="portrait"    android:windowSoftInputMode="adjustResize"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /><action android:name="android.intent.action.DOWNLOAD_COMPLETE"/></intent-filter></activity><activity-alias    android:targetActivity=".MainActivity"    android:name="${applicationId}.AliasMainActivity"    android:label="@string/app_name"    android:enabled="true"    android:exported="true"><intent-filter><action android:name="android.intent.action.VIEW" /><category android:name="android.intent.category.DEFAULT" /><category android:name="android.intent.category.BROWSABLE" /><data android:scheme="someapp" android:host="*" /></intent-filter></activity-alias>

So when I do,

adb shell am start -W -a android.intent.action.VIEW -d "someapp://some_deep_link"

it shows,

Starting: Intent { act=android.intent.action.VIEW dat=someapp://some_deep_link }Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=someapp://some_deep_link flg=0x10000000 }

But when I move the intent filter from activity-alias to normal activity it starts working.

Also it's a react-native app.

FAQ.Why do you need activity-alias?

I don't know myself, as the code was already there. activity-alias is used for opening deep linking through notification. If you guys thing it is not needed it is not needed. But I need the reason as well.

Bonus: if you know why activity-alias is important/needed in this case.

React native gradlew assembleRelease build failed. Execution failed for task ':app:mergeReleaseResources'

$
0
0

I'm encountering with this error, when run ./gradlew assembleRelease. I've tinkering about in some hours. Help pls. It was once builded successfully but, after my attempts of clearing something and combining different folders from my git history, nothing could rescue.

FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:mergeReleaseResources'.> [raw/app] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/app.json [raw/app] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/app.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_materialcommunityicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_materialcommunityicons.json[raw/node_modules_reactnativevectoricons_glyphmaps_materialcommunityicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_materialcommunityicons.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free_meta] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free_meta.json[raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free_meta] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free_meta.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome.json[raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_fontisto] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_fontisto.json   [raw/node_modules_reactnativevectoricons_glyphmaps_fontisto] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_fontisto.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_feather] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_feather.json[raw/node_modules_reactnativevectoricons_glyphmaps_feather] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_feather.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_entypo] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_entypo.json   [raw/node_modules_reactnativevectoricons_glyphmaps_entypo] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_entypo.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_ionicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_ionicons.json   [raw/node_modules_reactnativevectoricons_glyphmaps_ionicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_ionicons.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free.json   [raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_simplelineicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_simplelineicons.json[raw/node_modules_reactnativevectoricons_glyphmaps_simplelineicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_simplelineicons.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_evilicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_evilicons.json [raw/node_modules_reactnativevectoricons_glyphmaps_evilicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_evilicons.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_materialicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_materialicons.json [raw/node_modules_reactnativevectoricons_glyphmaps_materialicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_materialicons.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_antdesign] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_antdesign.json [raw/node_modules_reactnativevectoricons_glyphmaps_antdesign] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_antdesign.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_foundation] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_foundation.json   [raw/node_modules_reactnativevectoricons_glyphmaps_foundation] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_foundation.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_octicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_octicons.json   [raw/node_modules_reactnativevectoricons_glyphmaps_octicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_octicons.json: Error: Duplicate resources  [raw/node_modules_nativebase_dist_src_basic_icon_nbicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_nativebase_dist_src_basic_icon_nbicons.json [raw/node_modules_nativebase_dist_src_basic_icon_nbicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_nativebase_dist_src_basic_icon_nbicons.json: Error: Duplicate resources  [raw/node_modules_reactnativevectoricons_glyphmaps_zocial] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_zocial.json   [raw/node_modules_reactnativevectoricons_glyphmaps_zocial] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_zocial.json: Error: Duplicate resources* Try:Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.* Get more help at https://help.gradle.orgDeprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.Use '--warning-mode all' to show the individual deprecation warnings.See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warningsBUILD FAILED in 58s65 actionable tasks: 11 executed, 54 up-to-date

How can I show the suggestion bar over the keyboard

$
0
0

I need to show the suggestion bar over the keyboard, while I am typing there must be some word suggestions & on tap of suggested words those must be updated in TextInput field.

In React-Native for iOS & android both.I have scene the InputAccessoryView but it is not working.

I have also used as well, but not showing any bar on keyboard.

Viewing all 29539 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>