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

How to use a geolocation component that watches changes in geolocation?

$
0
0

I have a App component which is:

import Home from './screens/Home';import * as React from 'react';const App = () => {  return <Home />;};export default App;

My home component looks like:

  export default class Home extends React.PureComponent {  render() {    return (<><View style={styles.container}><Text style={styles.heading}> Location Manager </Text><CurrentLocation /><LocationList /></View><ClearButton /></>    );  }}

I wrote a component that watches for location changes:it looks like:

export const useGeolocation = (): [string, GeolocationData] => {  const [error, setError] = useState('');  const [position, setPosition] = useState<GeolocationData>({    latitude: 0,    longitude: 0,  });  useEffect(() => {    const watchId = Geolocation.watchPosition(      (pos) => {        setError('');        setPosition({          latitude: pos.coords.latitude,          longitude: pos.coords.longitude,        });      },      (e) => setError(e.message),    );    return () => Geolocation.clearWatch(watchId);  }, []);  return [error, position];};

Now how do I use this component? where do I place this? I read it on a tutorial that it will unsubscribe when user is not using the app (backgrounded) or component will unmount? How to achieve that?


Android app crashes after integrating React Native with NoClassDefFoundError: com.facebook.react.bridge.JSPackagerWebSocketClient

$
0
0

I integrated React Native into an existing Android project. The code compiles fine, but when I get to the part of my app that initializes React Native, the app crashes.

Relevant part of the backtrace:

java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be created      Caused by: java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be created        at com.facebook.react.devsupport.DevSupportManagerFactory.create(DevSupportManagerFactory.java:77)      Caused by: java.lang.reflect.InvocationTargetException        at java.lang.reflect.Constructor.newInstance(Native Method)        at com.facebook.react.devsupport.DevSupportManagerFactory.create(DevSupportManagerFactory.java:70)      Caused by: java.lang.NoClassDefFoundError: com.facebook.react.bridge.JSPackagerWebSocketClient        at com.facebook.react.devsupport.DevServerHelper.<init>(DevServerHelper.java:108)        at com.facebook.react.devsupport.DevSupportManagerImpl.<init>(DevSupportManagerImpl.java:141)

The key part is

java.lang.NoClassDefFoundError: com.facebook.react.bridge.JSPackagerWebSocketClient.

I'm not sure why this class wouldn't be found. The location where this crash happens in the React Native source code is here.

UPDATE: If it's relevant, I was getting compile-time errors before this that I fixed with the solution here (which excludes okhttp-ws) which I wonder may be causing this.

UPDATE 2: I'm starting to think this is related to excluding okhttp-ws since I noticed in JSPackagerWebSocketClient.java there are imports such as:

import okhttp3.ws.WebSocket;

So I guess the real question is what is the real fix for the original issue I was having, which is:

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: okhttp3/internal/ws/RealWebSocket$1.class

I'm using React Native v0.31.0.

Exoplayer infinite buffer state

$
0
0

I'm trying to use the exoplayer for my React Native app using the React Native video package.

I have an app with both a HLS stream and a mp4 videos, these videos and are stored on my server (https).

When browsing through videos the player gets stuck in an infinite buffer state and stays that way until I restart the app. This is completely random. The only way to reproduce the problem is just watching videos and switch the source multiple times.

When looking in the Android logcat there are no errors. adb bugreport doesn't work either.

05-22 10:51:07.884 22911-22911/eu.domain.app I/EXO PLAYER: isBuffering - true05-22 10:51:08.180 22911-25217/eu.domain.app I/ACodec:  [] Now uninitialized05-22 10:51:08.181 22911-25221/eu.domain.app I/ACodec: [] onAllocateComponent05-22 10:51:08.184 22911-25221/eu.domain.app I/OMXClient: MuxOMX ctor05-22 10:51:08.210 22911-25221/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Loaded05-22 10:51:08.214 22911-25220/eu.domain.app I/MediaCodec: [OMX.Exynos.avc.dec] setting surface generation to 2346087005-22 10:51:08.217 22911-25221/eu.domain.app I/ACodec: can't find wfdsink-exynos-enable05-22 10:51:08.226 22911-25221/eu.domain.app I/ACodec: codec does not support config priority (err -1010)05-22 10:51:08.235 22911-25221/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Loaded->Idle05-22 10:51:08.268 22911-25221/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] configureOutputBuffersFromNativeWindow setBufferCount : 8, minUndequeuedBuffers : 405-22 10:51:08.285 22911-25217/eu.domain.app I/ACodec:  [] Now uninitialized05-22 10:51:08.286 22911-25224/eu.domain.app I/ACodec: [] onAllocateComponent05-22 10:51:08.299 22911-25221/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Idle->Executing05-22 10:51:08.303 22911-25224/eu.domain.app I/OMXClient: MuxOMX ctor05-22 10:51:08.304 22911-25221/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Executing05-22 10:51:08.323 22911-25224/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Loaded05-22 10:51:08.329 22911-25221/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now handling output port settings change05-22 10:51:08.335 22911-25224/eu.domain.app I/ACodec: codec does not support config priority (err -2147483648)05-22 10:51:08.337 22911-25221/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] configureOutputBuffersFromNativeWindow setBufferCount : 15, minUndequeuedBuffers : 405-22 10:51:08.337 22911-25224/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Loaded->Idle05-22 10:51:08.347 22911-25221/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Executing05-22 10:51:08.349 22911-25224/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Idle->Executing05-22 10:51:08.350 22911-25224/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Executing05-22 10:51:08.361 22911-25224/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now handling output port settings change05-22 10:51:08.398 22911-25224/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Executing05-22 10:51:08.454 22911-25217/eu.domain.app I/AudioTrack: This process already got info. FadeIn[0] FadeOut[0] FadeInRing[0]05-22 10:51:08.485 22911-22911/eu.domain.app I/EXO PLAYER: isBuffering - false05-22 10:51:11.898 22911-22922/eu.domain.app I/art: Background sticky concurrent mark sweep GC freed 41338(3MB) AllocSpace objects, 16(388KB) LOS objects, 5% free, 63MB/67MB, paused 4.005ms total 110.586ms05-22 10:51:13.124 22911-22922/eu.domain.app I/art: Background partial concurrent mark sweep GC freed 15341(1151KB) AllocSpace objects, 2(32KB) LOS objects, 19% free, 65MB/81MB, paused 3.007ms total 105.323ms05-22 10:51:13.670 22911-22915/eu.domain.app I/art: Do partial code cache collection, code=251KB, data=235KB05-22 10:51:13.673 22911-22915/eu.domain.app I/art: After code cache collection, code=248KB, data=233KB    Increasing code cache capacity to 1024KB05-22 10:51:14.023 22911-23396/eu.domain.app W/ReactNativeJS: Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See https://github.com/facebook/react-native/issues/12981 for more info.    (Saw setTimeout with duration 1800000ms)05-22 10:51:17.806 22911-25220/eu.domain.app I/MediaCodec: [OMX.Exynos.avc.dec] setting surface generation to 2346087105-22 10:51:17.828 22911-22911/eu.domain.app I/ExoPlayerImpl: Release 2282d90 [ExoPlayerLib/2.8.0] [j5y17lte, SM-J530F, samsung, 24] [goog.exo.core, goog.exo.hls, goog.exo.okhttp]05-22 10:51:17.829 22911-25221/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Executing->Idle05-22 10:51:17.852 22911-25221/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Idle->Loaded    [OMX.Exynos.avc.dec] Now Loaded     [OMX.Exynos.avc.dec] Now kWhatShutdownCompleted event : 858505-22 10:51:17.853 22911-25220/eu.domain.app I/MediaCodec: Codec shutdown complete05-22 10:51:17.857 22911-25221/eu.domain.app I/ACodec:  [OMX.Exynos.avc.dec] Now uninitialized     [] Now kWhatShutdownCompleted event : 858505-22 10:51:17.858 22911-25220/eu.domain.app I/MediaCodec: Codec shutdown complete05-22 10:51:17.866 22911-25224/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Executing->Idle05-22 10:51:17.873 22911-25224/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Idle->Loaded    [OMX.google.aac.decoder] Now Loaded     [OMX.google.aac.decoder] Now kWhatShutdownCompleted event : 858505-22 10:51:17.873 22911-25224/eu.domain.app I/MediaCodec: Codec shutdown complete05-22 10:51:17.878 22911-25224/eu.domain.app I/ACodec:  [OMX.google.aac.decoder] Now uninitialized     [] Now kWhatShutdownCompleted event : 858505-22 10:51:17.878 22911-25224/eu.domain.app I/MediaCodec: Codec shutdown complete05-22 10:51:17.959 22911-22922/eu.domain.app I/art: Background partial concurrent mark sweep GC freed 10383(476KB) AllocSpace objects, 0(0B) LOS objects, 16% free, 82MB/98MB, paused 9.123ms total 301.557ms05-22 10:51:19.265 22911-22911/eu.domain.app I/ExoPlayerImpl: Init 3448cf0 [ExoPlayerLib/2.8.0] [j5y17lte, SM-J530F, samsung, 24]05-22 10:51:19.272 22911-22911/eu.domain.app I/EXO PLAYER: isBuffering - true05-22 10:51:19.288 22911-22911/eu.domain.app I/EXO PLAYER: isBuffering - true05-22 10:51:19.410 22911-25298/eu.domain.app I/ACodec:  [] Now uninitialized05-22 10:51:19.420 22911-25301/eu.domain.app I/ACodec: [] onAllocateComponent05-22 10:51:19.423 22911-25301/eu.domain.app I/OMXClient: MuxOMX ctor05-22 10:51:19.449 22911-25301/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Loaded05-22 10:51:19.458 22911-25300/eu.domain.app I/MediaCodec: [OMX.Exynos.avc.dec] setting surface generation to 2346087205-22 10:51:19.460 22911-25301/eu.domain.app I/ACodec: can't find wfdsink-exynos-enable05-22 10:51:19.464 22911-25301/eu.domain.app I/ACodec: codec does not support config priority (err -1010)05-22 10:51:19.471 22911-25301/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Loaded->Idle05-22 10:51:19.478 22911-25301/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] configureOutputBuffersFromNativeWindow setBufferCount : 9, minUndequeuedBuffers : 505-22 10:51:19.496 22911-25298/eu.domain.app I/ACodec:  [] Now uninitialized05-22 10:51:19.499 22911-25305/eu.domain.app I/ACodec: [] onAllocateComponent05-22 10:51:19.501 22911-25305/eu.domain.app I/OMXClient: MuxOMX ctor05-22 10:51:19.508 22911-25301/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Idle->Executing05-22 10:51:19.510 22911-25305/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Loaded05-22 10:51:19.510 22911-25301/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Executing05-22 10:51:19.534 22911-25301/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now handling output port settings change05-22 10:51:19.540 22911-25301/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] configureOutputBuffersFromNativeWindow setBufferCount : 16, minUndequeuedBuffers : 505-22 10:51:19.541 22911-25305/eu.domain.app I/ACodec: codec does not support config priority (err -2147483648)05-22 10:51:19.543 22911-25305/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Loaded->Idle05-22 10:51:19.550 22911-25305/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Idle->Executing05-22 10:51:19.553 22911-25305/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Executing05-22 10:51:19.554 22911-25301/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Executing05-22 10:51:19.561 22911-25305/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now handling output port settings change05-22 10:51:19.572 22911-25305/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Executing05-22 10:51:19.599 22911-25298/eu.domain.app I/AudioTrack: This process already got info. FadeIn[0] FadeOut[0] FadeInRing[0]05-22 10:51:19.606 22911-22911/eu.domain.app I/EXO PLAYER: isBuffering - false05-22 10:51:19.634 22911-25300/eu.domain.app I/MediaCodec: [OMX.Exynos.avc.dec] setting surface generation to 2346087305-22 10:51:24.107 22911-23396/eu.domain.app W/ReactNativeJS: Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See https://github.com/facebook/react-native/issues/12981 for more info.    (Saw setTimeout with duration 1800000ms)05-22 10:51:26.949 22911-25300/eu.domain.app I/MediaCodec: [OMX.Exynos.avc.dec] setting surface generation to 2346087405-22 10:51:26.967 22911-22911/eu.domain.app I/ExoPlayerImpl: Release 3448cf0 [ExoPlayerLib/2.8.0] [j5y17lte, SM-J530F, samsung, 24] [goog.exo.core, goog.exo.hls, goog.exo.okhttp]05-22 10:51:26.974 22911-25301/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Executing->Idle05-22 10:51:26.989 22911-25301/eu.domain.app I/ACodec: [OMX.Exynos.avc.dec] Now Idle->Loaded    [OMX.Exynos.avc.dec] Now Loaded     [OMX.Exynos.avc.dec] Now kWhatShutdownCompleted event : 858505-22 10:51:26.991 22911-25300/eu.domain.app I/MediaCodec: Codec shutdown complete05-22 10:51:26.993 22911-25301/eu.domain.app I/ACodec:  [OMX.Exynos.avc.dec] Now uninitialized05-22 10:51:26.994 22911-25301/eu.domain.app I/ACodec:  [] Now kWhatShutdownCompleted event : 858505-22 10:51:26.995 22911-25300/eu.domain.app I/MediaCodec: Codec shutdown complete05-22 10:51:27.000 22911-25305/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Executing->Idle05-22 10:51:27.010 22911-25305/eu.domain.app I/ACodec: [OMX.google.aac.decoder] Now Idle->Loaded    [OMX.google.aac.decoder] Now Loaded     [OMX.google.aac.decoder] Now kWhatShutdownCompleted event : 858505-22 10:51:27.010 22911-25305/eu.domain.app I/MediaCodec: Codec shutdown complete05-22 10:51:27.013 22911-25305/eu.domain.app I/ACodec:  [OMX.google.aac.decoder] Now uninitialized     [] Now kWhatShutdownCompleted event : 858505-22 10:51:27.013 22911-25305/eu.domain.app I/MediaCodec: Codec shutdown complete05-22 10:51:27.926 22911-22911/eu.domain.app I/ExoPlayerImpl: Init c209446 [ExoPlayerLib/2.8.0] [j5y17lte, SM-J530F, samsung, 24]05-22 10:51:27.933 22911-22911/eu.domain.app I/EXO PLAYER: isBuffering - true05-22 10:51:27.953 22911-22911/eu.domain.app I/EXO PLAYER: isBuffering - true

Note: I did an update to exoplayer 2.8.0, the package is using 2.4.0. But it isn't working on both versions.

Is someone familiar with this issue?

Will react native work without Google Services on Huawei phone?

$
0
0

Soon new Huawei phones will stop supporting Google Play and Google Mobile Services.

Huawei is preparing its own ecosystem called HMS https://developer.huawei.com/consumer/en/service/hms/developer.html

Their app store is called "Huawei App Gallery" and has its documentation here: https://developer.huawei.com/consumer/en/doc/30202

They are now sending messages to developers (including me) that encourage them to release an app to their store. They are claiming that they only need an APK file and no changes to the application are needed.

My questions are:

  • Is a react-native app going to work without code changes?
  • Is Firebase SDK going to work?
  • What is the real hidden cost of maintaining an app in another Android ecosystem?

Dynamic feature: Unable to instantiate activity ComponentInfo

$
0
0

I am getting an error saying unable to instantiate activity. This activity is a module ModuleX which is inside the main project and also it's enabled for dynamic feature.

Also, I have recently added one another library TwilioRN on the main project ProjectX. Both ModuleX and TwilioRN has the same dependencies using same version.

ProjectX - build.gradle    - implementation project(':react-native-twilio-video-webrtc')        - dependencies             - implementation 'com.twilio:video-android:5.6.0' - ModuleX (dynamic feature)    - build.gradle       - implementation 'com.twilio:video-android:5.6.0'

Actual Behaviour:

  • when I removed TwilioRN from main project, com.projectX/com.moduleX.videocall.VideoActivity activity started successfully and it worked.
  • But when twilioRN are present, VideoActivity activity is not called and getting crashed.

Expected Behaviour:

VideoCallAcitivity of ModuleX should start even when added TwilioRN library.

Log:

java.lang.RuntimeException Unable to instantiate activity ComponentInfo{com.projectX/com.moduleX.videocall.VideoActivity}: java.lang.ClassNotFoundException: Didn't find class "com.moduleX.videocall.VideoActivity" on path: DexPathList[[zip file "/data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/base.apk", zip file "/data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/split_config.en.apk", zip file "/data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/split_config.x86.apk", zip file "/data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/split_config.xxxhdpi.apk"],nativeLibraryDirectories=[/data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/lib/x86, /data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/base.apk!/lib/x86, /data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/split_config.en.apk!/lib/x86, /data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/split_config.x86.apk!/lib/x86, /data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/split_config.xxxhdpi.apk!/lib/x86, /system/lib]]     ActivityThread.java:2843 android.app.ActivityThread.performLaunchActivity    ActivityThread.java:3048 android.app.ActivityThread.handleLaunchActivity    LaunchActivityItem.java:78 android.app.servertransaction.LaunchActivityItem.execute    TransactionExecutor.java:108 android.app.servertransaction.TransactionExecutor.executeCallbacks    TransactionExecutor.java:68 android.app.servertransaction.TransactionExecutor.execute    ActivityThread.java:1808 android.app.ActivityThread$H.handleMessage    Handler.java:106 android.os.Handler.dispatchMessage    Looper.java:193 android.os.Looper.loop    ActivityThread.java:6669 android.app.ActivityThread.main    Method.java:-2 java.lang.reflect.Method.invoke    RuntimeInit.java:493 com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run    ZygoteInit.java:858 com.android.internal.os.ZygoteInit.mainCaused by: java.lang.ClassNotFoundException Didn't find class "com.moduleX.videocall.VideoActivity" on path: DexPathList[[zip file "/data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/base.apk", zip file "/data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/split_config.en.apk", zip file "/data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/split_config.x86.apk", zip file "/data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/split_config.xxxhdpi.apk"],nativeLibraryDirectories=[/data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/lib/x86, /data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/base.apk!/lib/x86, /data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/split_config.en.apk!/lib/x86, /data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/split_config.x86.apk!/lib/x86, /data/app/com.projectX-keGmsJJoT8rTJ-j07QeHwg==/split_config.xxxhdpi.apk!/lib/x86, /system/lib]] BaseDexClassLoader.java:134 dalvik.system.BaseDexClassLoader.findClassClassLoader.java:379 java.lang.ClassLoader.loadClassClassLoader.java:312 java.lang.ClassLoader.loadClassAppComponentFactory.java:69 android.app.AppComponentFactory.instantiateActivityCoreComponentFactory.java:43 android.support.v4.app.CoreComponentFactory.instantiateActivityInstrumentation.java:1215 android.app.Instrumentation.newActivityActivityThread.java:2831 android.app.ActivityThread.performLaunchActivityActivityThread.java:3048 android.app.ActivityThread.handleLaunchActivityLaunchActivityItem.java:78 android.app.servertransaction.LaunchActivityItem.executeTransactionExecutor.java:108 android.app.servertransaction.TransactionExecutor.executeCallbacksTransactionExecutor.java:68 android.app.servertransaction.TransactionExecutor.executeActivityThread.java:1808 android.app.ActivityThread$H.handleMessageHandler.java:106 android.os.Handler.dispatchMessageLooper.java:193 android.os.Looper.loopActivityThread.java:6669 android.app.ActivityThread.mainMethod.java:-2 java.lang.reflect.Method.invokeRuntimeInit.java:493 com.android.internal.os.RuntimeInit$MethodAndArgsCaller.runZygoteInit.java:858 com.android.internal.os.ZygoteInit.main

use ExoPlayer in React Native

$
0
0

Hi I'm using react native, so I needed exoplayer to show subtitle on it in android....I added exoplayer inside my app, after that should I do something to use exoplayer as default or it will link to react-native-video ?thanks

Expo admob plugin error loading production ads

$
0
0

I'm using the Expo Admob library as part of my React Native app.

https://docs.expo.io/versions/latest/sdk/admob/

The Rewarded Admob Ad feature that works perfectly with a Test Admob Unit Id fails when using my production Admob Unit Id.

This works great! The ad loads.

await AdMobRewarded.setAdUnitID('ca-app-pub-3940256099942544/5224354917'); // Test ID, Replace with your-admob-unit-idawait AdMobRewarded.requestAdAsync();await AdMobRewarded.showAdAsync();

If I replace setAdUnitID(...) with my production key, the ad does not load instead throws the following error. I am running this using the Expo client so I can capture the error message however I am still getting an error when running it in production (eg. installing the apk).

[Unhandled promise rejection: Error: ERROR_CODE_INTERNAL_ERROR]- node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:99:50 in fn- node_modules\@unimodules\react-native-adapter\build\NativeModulesProxy.js:15:46 in moduleName.methodInfo.name* http://192.168.1.108:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:129676:102 in requestAdAsync$- node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch- node_modules\regenerator-runtime\runtime.js:274:30 in invoke- node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch- node_modules\regenerator-runtime\runtime.js:135:28 in invoke- node_modules\regenerator-runtime\runtime.js:170:17 in PromiseImpl$argument_0- node_modules\promise\setimmediate\core.js:45:7 in tryCallTwo- node_modules\promise\setimmediate\core.js:200:23 in doResolve- node_modules\promise\setimmediate\core.js:66:12 in Promise- node_modules\regenerator-runtime\runtime.js:169:31 in PromiseImpl$argument_0- node_modules\regenerator-runtime\runtime.js:192:38 in enqueue- node_modules\regenerator-runtime\runtime.js:219:8 in exports.async- node_modules\expo-ads-admob\build\AdMobRewarded.js:19:15 in <global>- node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch- node_modules\regenerator-runtime\runtime.js:274:30 in invoke- node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch- node_modules\regenerator-runtime\runtime.js:135:28 in invoke- node_modules\regenerator-runtime\runtime.js:170:17 in PromiseImpl$argument_0- node_modules\promise\setimmediate\core.js:45:7 in tryCallTwo- node_modules\promise\setimmediate\core.js:200:23 in doResolve- node_modules\promise\setimmediate\core.js:66:12 in Promise- node_modules\regenerator-runtime\runtime.js:169:31 in PromiseImpl$argument_0- node_modules\regenerator-runtime\runtime.js:192:38 in enqueue- node_modules\regenerator-runtime\runtime.js:219:8 in exports.async- node_modules\promise\setimmediate\core.js:37:14 in tryCallOne- node_modules\promise\setimmediate\core.js:123:25 in setImmediate$argument_0- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:146:14 in _callTimer- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:194:17 in _callImmediatesPass- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:458:30 in callImmediates* [native code]:null in callImmediates- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:407:6 in __callImmediates- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:143:6 in __guard$argument_0- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:384:10 in __guard- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:142:17 in __guard$argument_0* [native code]:null in flushedQueue* [native code]:null in invokeCallbackAndReturnFlushedQueue

I'm using

Expo: 37.0.3expo-ads-admob: 8.1.0react: 16.9.0react-native: 0.61.4

Is there something here that I have missed?

React Native Expo - Open URL in browser package

$
0
0

I am trying to open URL in a specific browser using package name in Android. I am using Expo's WebBrowser.openBrowserAsync()

Per documentation, you can pass the browser package name.

https://docs.expo.io/versions/v37.0.0/sdk/webbrowser/#webbrowseropenbrowserasyncurl

package (optional) (string) -- (Android only). Package name of a browser to be used to handle Custom Tabs

So, I tried using the code below, but its showing a browser selection dialog. How can I open it automatically in Chrome without prompting for the browser selection dialog?

WebBrowser.openBrowserAsync('https://google.com', { package: 'com.android.chrome' });

Task 'installDebug' not found in project ':app'(npx react-native run-android issue)

$
0
0

After running npx react-native run-android i got the common issue "Task 'installDebug' not found in project ':app".'enter image description here

Following an advice i tried to do this https://reactnative.dev/docs/signed-apk-android, but when i run:$ ./gradlew bundleRelease from android directory i got: "Task 'bundleRelease' not found in root project 'MoscowForDummies'."

My gradle.properties:

MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystoreMYAPP_UPLOAD_KEY_ALIAS=my-key-aliasMYAPP_UPLOAD_STORE_PASSWORD=Profit***MYAPP_UPLOAD_KEY_PASSWORD=Profit***

Part of my build.gradle:

android {compileSdkVersion rootProject.ext.compileSdkVersioncompileOptions {    sourceCompatibility JavaVersion.VERSION_1_8    targetCompatibility JavaVersion.VERSION_1_8}defaultConfig {    applicationId "com.moscowfordummies"    minSdkVersion rootProject.ext.minSdkVersion    targetSdkVersion rootProject.ext.targetSdkVersion    versionCode 1    versionName "1.0"}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        }    }}

and my ~/.bash_profile:

export ANDROID_HOME=$HOME/Android/Sdkexport PATH=$PATH:$ANDROID_HOME/emulatorexport PATH=$PATH:$ANDROID_HOME/toolsexport PATH=$PATH:$ANDROID_HOME/tools/binexport PATH=$PATH:$ANDROID_HOME/platform-tools

Does anybody have any advice how to fix the problem?

how to convert react.js web app to react native mobile app?

$
0
0

I have a react.js web app I need to convert to the mobile app, Is there any way to do that? I have tried to search for a solution but I did not find anything that can helpThanks.

Generate "out of view" markers indicators on a map with React Native

$
0
0

For a project, I have to indicate, with colored arrows, in which direction are the markers that aren't shown in the visible region.

When the user scrolls, or zoom on the map, the arrows move accordingly to where the not visible markers are compared to the current center of the visible region.

Here is a picture that demonstrate what is needed :

enter image description here

I am using react-native-mapview and added regular views over the map to show the indicators.

I've started working on this by comparing the coordinates and calculating the point of intersection between lines (border lines and line made by the 2 coordinates) at each frame. It works fine on iOS but is pretty laggy on Android, especially chan there are a lot of markers involved.

What would be the best and optimized way to do this ?

Universal DeepLink on iOS doesn't work through web navigator but works for basic click

$
0
0

I've a problem with deeplink on iOS. Here is the case : I've a web page with a classic button using an universal link such as https://my-app/routeA/params.

If the user directly clicked on this link through mail, note, message the deeplink to my mobile app is working. However, if he clicked with the button (on the web page), through safari or chrome, the deeplink doesn't work.

By the way, the deeplink works well on Android when the user click on the button (within the web page).

So it seems to be a problem with web navigator on iOS. Any ideas what's wrong here ?

How to dynamically load apps like Expo client

$
0
0

Is it possible to load "sub-apps" inside a mobile application? The way like Expo client does that - you start a "parent" app and inside that you dynamically load other apps.

Requirements:

  • Parent app downloadable from the store.
  • Sub-apps not published in the store
  • Sub-apps always up to date - possibility to update them independently on the parent app.
  • Android and iOS compatible

injectedJavaScript is not working in Webview of react native

$
0
0

I am not able to inject this simple js code into react-native webview.

I referred this link also but no solution provided here.

Then I found this one which works for html props but not uri.

import React, { Component } from 'react';import { Platform,  StyleSheet,  Text,  View,  WebView} from 'react-native';export default class App extends Component<{}> {  injectjs(){    let jsCode = 'alert(hello)';    return jsCode;  }  render() {    return <WebView     javaScriptEnabled={true}    injectedJavaScript={this.injectjs()}     source={{uri:"https://www.google.com"}} style={{ marginTop: 20 }} />;  }}

react-native nested viewpagers don't scrolling

$
0
0

I'm using react-native-best-viewpager to make a easy viewpager without too many work on some graphics stuff, but i'm in need of using nested viewpagers (One inside other), like the code below, but the problem it's that the second viewpager dont scroll, only the first one. If this was a Scrollview i would use nestedScrollEnabled={true}, but this is a viewpager:

import React, { Component } from 'react'import {IndicatorViewPager, PagerTabIndicator, PagerDotIndicator } from 'react-native-best-viewpager'import { View } from 'react-native'class MainScreen extends Component {    _renderTabIndicator() {        let tabs = [            {                text: 'Screen'            }]        return <PagerTabIndicator tabs={tabs} />    }    _renderDotIndicator() {        return <PagerDotIndicator pageCount={1} />    }    render() {        return (<View style={{flex: 1}}><IndicatorViewPager style={{height: 500}} initialPage={1} indicator={this._renderTabIndicator()}><View style={{flex: 1}}><IndicatorViewPager style={{height: 300}} indicator={this._renderDotIndicator()}><View style={{flex: 1}}><View style={{BackgroundColor: 'black', height: 50, width: 50}}/></View></IndicatorViewPager></View></IndicatorViewPager></View>        )    }}export default MainViewport;

(Just a example code)

Thanks in advance!


React-Native fresh App immediately closes when launch on real devices

$
0
0

I want to develop android app using React-Native, it works well on emulator, but when I try with real device, the app immediately closes when launch, even if it with fress react-native init projectName.

When I try to see at the Logcat, here is the result when I try to open the fresh app:

11-24 07:03:39.408 2007-2007/? E/PhoneStatusBar: updateNotificationTitleText  preIsInsidePanelCanSlide =true,misInsidePanelCanSlide = true,misInsidePanelOpen = false11-24 07:03:40.068 2708-3433/? D/PhoneInterfaceManager: [PhoneIntfMgr] getDefaultSubscription, sub = 1211-24 07:03:40.068 2708-3609/? D/PhoneInterfaceManager: [PhoneIntfMgr] getDefaultSubscription, sub = 1211-24 07:03:40.098 2708-3600/? D/PhoneInterfaceManager: [PhoneIntfMgr] getDefaultSubscription, sub = 1211-24 07:03:40.108 2708-3107/? D/PhoneInterfaceManager: [PhoneIntfMgr] getDefaultSubscription, sub = 12    --------- beginning of system11-24 07:03:40.118 1022-1042/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.library_app2/.MainActivity bnds=[286,87][539,358]} from uid 10059 and from pid 2779 on display 011-24 07:03:40.128 15968-15988/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.128 15968-15968/? D/KeyguardViewMediator: handleKeyguardVisibilityChanged mKeyguardViewManager = com.android.keyguard.KeyguardViewManager@12d6678211-24 07:03:40.128 15968-15968/? D/KeyguardViewManager: handleKeyguardVisibilityChanged showing = true11-24 07:03:40.138 1022-1042/? V/WindowManager: addAppToken: AppWindowToken{3930ddf5 token=Token{148c1f2c ActivityRecord{272956df u0 com.library_app2/.MainActivity t1328}}} to stack=1 task=1328 at 011-24 07:03:40.138 1022-1060/? V/WindowManager: Based on layer: Adding window Window{3f5127c4 u0 Starting com.library_app2} at 5 of 1511-24 07:03:40.148 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.158 15968-15988/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.168 26069-26069/? I/art: Late-enabling -Xcheck:jni11-24 07:03:40.168 1022-1904/? I/ActivityManager: Start proc 26069:com.library_app2/u0a343 for activity com.library_app2/.MainActivity11-24 07:03:40.168 1022-1904/? D/ActivityManager:  (1) delay start com.library_app2 startResult.usingWrapper false11-24 07:03:40.208 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.348 15968-15987/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.348 1022-1904/? V/WindowManager: Changing focus from Window{1786b351 u0 com.oppo.launcher/com.oppo.launcher.Launcher} to null Callers=com.android.server.wm.WindowManagerService.handleAppTransitionReadyLocked:9943 com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLockedInner:10529 com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLockedLoop:9333 com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLocked:9275 11-24 07:03:40.348 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.348 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.358 15968-15988/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.368 15968-15988/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.368 15968-15987/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.378 15968-15988/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.378 26069-26069/com.library_app2 D/SoLoader: init start11-24 07:03:40.378 26069-26069/com.library_app2 D/SoLoader: adding system library source: /vendor/lib11-24 07:03:40.378 26069-26069/com.library_app2 D/SoLoader: adding system library source: /system/lib11-24 07:03:40.378 26069-26069/com.library_app2 D/SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.library_app2-1/lib/arm flags = 0]11-24 07:03:40.388 26069-26069/com.library_app2 D/SoLoader: adding backup source from : com.facebook.soloader.ApkSoSource[root = /data/data/com.library_app2/lib-main flags = 1]11-24 07:03:40.388 26069-26069/com.library_app2 D/SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]11-24 07:03:40.388 26069-26069/com.library_app2 D/SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/vendor/lib flags = 2]11-24 07:03:40.388 26069-26069/com.library_app2 D/SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.library_app2-1/lib/arm flags = 0]11-24 07:03:40.388 26069-26069/com.library_app2 D/SoLoader: Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.library_app2/lib-main flags = 1]11-24 07:03:40.388 26069-26069/com.library_app2 V/fb-UnpackingSoSource: locked dso store /data/data/com.library_app2/lib-main11-24 07:03:40.388 26069-26069/com.library_app2 I/fb-UnpackingSoSource: dso store is up-to-date: /data/data/com.library_app2/lib-main11-24 07:03:40.388 26069-26069/com.library_app2 V/fb-UnpackingSoSource: releasing dso store lock for /data/data/com.library_app2/lib-main11-24 07:03:40.388 26069-26069/com.library_app2 D/SoLoader: init finish: 4 SO sources prepared11-24 07:03:40.388 26069-26069/com.library_app2 D/SoLoader: init exiting11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err: java.lang.ClassNotFoundException: com.facebook.flipper.ReactNativeFlipper11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at java.lang.Class.classForName(Native Method)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at java.lang.Class.forName(Class.java:309)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at java.lang.Class.forName(Class.java:273)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at com.library_app2.MainApplication.initializeFlipper(MainApplication.java:61)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at com.library_app2.MainApplication.onCreate(MainApplication.java:46)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4735)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at android.app.ActivityThread.access$1600(ActivityThread.java:164)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1492)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at android.os.Looper.loop(Looper.java:159)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5473)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at java.lang.reflect.Method.invoke(Native Method)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at java.lang.reflect.Method.invoke(Method.java:372)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.flipper.ReactNativeFlipper" on path: DexPathList[[zip file "/data/app/com.library_app2-1/base.apk"],nativeLibraryDirectories=[/data/app/com.library_app2-1/lib/arm, /vendor/lib, /system/lib]]11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:   ... 16 more11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:   Suppressed: java.lang.ClassNotFoundException: com.facebook.flipper.ReactNativeFlipper11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at java.lang.Class.classForName(Native Method)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at java.lang.BootClassLoader.findClass(ClassLoader.java:781)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:504)11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:       ... 17 more11-24 07:03:40.388 26069-26069/com.library_app2 W/System.err:   Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available11-24 07:03:40.448 26069-26069/com.library_app2 W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: About to load: libjscexecutor.so11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libjscexecutor.so found on /data/data/com.library_app2/lib-main11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: Loading lib dependencies: [libfb.so, libreactnativejni.so, libjsc.so, libjsinspector.so, libfolly_json.so, libglog.so, libc++_shared.so, liblog.so, libc.so, libm.so, libdl.so]11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: About to load: libfb.so11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libfb.so found on /data/data/com.library_app2/lib-main11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: Loading lib dependencies: [libc++_shared.so, liblog.so, libdl.so, libandroid.so, libc.so, libm.so]11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: About to load: libc++_shared.so11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libc++_shared.so found on /data/data/com.library_app2/lib-main11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: Loading lib dependencies: [libc.so, libdl.so]11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: About to load: libc.so11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libc.so not found on /data/data/com.library_app2/lib-main11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libc.so not found on /data/app/com.library_app2-1/lib/arm11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libc.so not found on /system/vendor/lib11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libc.so found on /system/lib11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libc.so loaded implicitly11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: Loaded: libc.so11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: About to load: libdl.so11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libdl.so not found on /data/data/com.library_app2/lib-main11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libdl.so not found on /data/app/com.library_app2-1/lib/arm11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libdl.so not found on /system/vendor/lib11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libdl.so found on /system/lib11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: libdl.so loaded implicitly11-24 07:03:40.488 26069-26069/com.library_app2 D/SoLoader: Loaded: libdl.so11-24 07:03:40.488 26069-26069/com.library_app2 E/art: dlopen("/data/data/com.library_app2/lib-main/libc++_shared.so", RTLD_LAZY) failed: dlopen failed: "/data/data/com.library_app2/lib-main/libc++_shared.so" is 64-bit instead of 32-bit11-24 07:03:40.488 26069-26069/com.library_app2 E/SoLoader: couldn't find DSO to load: libc++_shared.so caused by: dlopen failed: "/data/data/com.library_app2/lib-main/libc++_shared.so" is 64-bit instead of 32-bit11-24 07:03:40.488 26069-26069/com.library_app2 E/SoLoader: couldn't find DSO to load: libfb.so caused by: couldn't find DSO to load: libc++_shared.so caused by: dlopen failed: "/data/data/com.library_app2/lib-main/libc++_shared.so" is 64-bit instead of 32-bit11-24 07:03:40.488 26069-26069/com.library_app2 E/SoLoader: couldn't find DSO to load: libjscexecutor.so caused by: couldn't find DSO to load: libfb.so caused by: couldn't find DSO to load: libc++_shared.so caused by: dlopen failed: "/data/data/com.library_app2/lib-main/libc++_shared.so" is 64-bit instead of 32-bit11-24 07:03:40.498 26069-26069/com.library_app2 D/ReactNative: ReactInstanceManager.ctor()11-24 07:03:40.498 26069-26069/com.library_app2 D/SoLoader: init exiting11-24 07:03:40.558 26069-26069/com.library_app2 D/ReactNative: ReactInstanceManager.createReactContextInBackground()11-24 07:03:40.568 26069-26069/com.library_app2 D/ReactNative: ReactInstanceManager.recreateReactContextInBackgroundInner()11-24 07:03:40.598 26069-26069/com.library_app2 I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>11-24 07:03:40.598 26069-26069/com.library_app2 I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>11-24 07:03:40.608 26069-26101/com.library_app2 W/unknown:InspectorPackagerConnection: Couldn't connect to packager, will silently retry11-24 07:03:40.608 26069-26100/com.library_app2 W/unknown:ReconnectingWebSocket: Couldn't connect to "ws://localhost:8081/message?device=R7sf%20-%205.1.1%20-%20API%2022&app=com.library_app2&clientid=DevSupportManagerImpl", will silently retry11-24 07:03:40.608 26069-26099/com.library_app2 W/unknown:ReactNative: The packager does not seem to be running as we got an IOException requesting its status: Failed to connect to localhost/127.0.0.1:808111-24 07:03:40.638 26069-26105/com.library_app2 D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true11-24 07:03:40.638 1022-2005/? V/WindowManager: Adding window Window{39362e65 u0 com.library_app2/com.library_app2.MainActivity} at 2 of 16 (before Window{3f5127c4 u0 Starting com.library_app2})11-24 07:03:40.648 26069-26069/com.library_app2 D/ReactNative: ReactInstanceManager.recreateReactContextInBackgroundFromBundleLoader()11-24 07:03:40.648 26069-26069/com.library_app2 D/ReactNative: ReactInstanceManager.recreateReactContextInBackground()11-24 07:03:40.648 26069-26069/com.library_app2 D/ReactNative: ReactInstanceManager.runCreateReactContextOnNewThread()11-24 07:03:40.648 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.668 26069-26069/com.library_app2 W/unknown:ReactNative: Packager connection already open, nooping.11-24 07:03:40.668 26069-26107/com.library_app2 D/SoLoader: About to load: libhermes.so11-24 07:03:40.668 26069-26107/com.library_app2 D/SoLoader: libhermes.so not found on /data/data/com.library_app2/lib-main11-24 07:03:40.668 26069-26107/com.library_app2 D/SoLoader: libhermes.so not found on /data/app/com.library_app2-1/lib/arm11-24 07:03:40.668 26069-26107/com.library_app2 D/SoLoader: libhermes.so not found on /system/vendor/lib11-24 07:03:40.668 26069-26107/com.library_app2 D/SoLoader: libhermes.so not found on /system/lib11-24 07:03:40.668 26069-26107/com.library_app2 E/SoLoader: couldn't find DSO to load: libhermes.so11-24 07:03:40.678 26069-26107/com.library_app2 E/AndroidRuntime: FATAL EXCEPTION: create_react_context    Process: com.library_app2, PID: 26069    java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)        at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20)        at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27)        at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:952)        at java.lang.Thread.run(Thread.java:818)11-24 07:03:40.678 1022-2704/? D/ActivityManager: addErrorToDropBox processName = com.library_app211-24 07:03:40.678 1022-2489/? V/WindowManager: Changing focus from null to Window{39362e65 u0 com.library_app2/com.library_app2.MainActivity} Callers=com.android.server.wm.WindowManagerService.relayoutWindow:3446 com.android.server.wm.Session.relayout:202 android.view.IWindowSession$Stub.onTransact:273 com.android.server.wm.Session.onTransact:130 11-24 07:03:40.678 15968-15987/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.698 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.698 1022-2704/? W/ActivityManager:   Force finishing activity 1 com.library_app2/.MainActivity11-24 07:03:40.698 26069-26105/com.library_app2 I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BR.1.1.3.C8.05.01.00.115.099_msm8916_64_refs/tags/AU_LINUX_ANDROID_LA.BR.1.1.3.C8.05.01.00.115.099__release_AU (Ib5665b357a)    OpenGL ES Shader Compiler Version: E031.25.03.04    Build Date: 11/13/15 Fri    Local Branch:     Remote Branch: refs/tags/AU_LINUX_ANDROID_LA.BR.1.1.3.C8.05.01.00.115.099    Local Patches: NONE    Reconstruct Branch: NOTHING11-24 07:03:40.708 15968-15988/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.708 1022-26108/? D/DropBoxManagerService: file :: /data/system/dropbox/data_app_crash@1574553820706.txt11-24 07:03:40.708 26069-26105/com.library_app2 I/OpenGLRenderer: Initialized EGL, version 1.411-24 07:03:40.718 26069-26105/com.library_app2 D/OpenGLRenderer: Enabling debug mode 011-24 07:03:40.768 2531-2531/? W/ResourceType: For resource 0x7f0b001d, entry index(29) is beyond type entryCount(23)11-24 07:03:40.778 1022-1051/? V/WindowManager: Changing focus from Window{39362e65 u0 com.library_app2/com.library_app2.MainActivity} to Window{17b4c51d u0 Application Error: com.library_app2} Callers=com.android.server.wm.WindowManagerService.addWindow:2696 com.android.server.wm.Session.addToDisplay:173 android.view.ViewRootImpl.setView:612 android.view.WindowManagerGlobal.addView:300 11-24 07:03:40.778 1022-1051/? W/ActivityManager:  Dismiss app error dialog : com.library_app211-24 07:03:40.798 15968-15988/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.808 15968-15987/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.818 1022-1040/? I/art: Background sticky concurrent mark sweep GC freed 144079(7MB) AllocSpace objects, 0(0B) LOS objects, 3% free, 134MB/138MB, paused 2.940ms total 108.195ms11-24 07:03:40.818 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.818 1022-1051/? V/WindowManager: Changing focus from Window{17b4c51d u0 Application Error: com.library_app2} to null Callers=com.android.server.wm.WindowManagerService.removeWindowLocked:2866 com.android.server.wm.WindowManagerService.removeWindowLocked:2775 com.android.server.wm.WindowManagerService.removeWindow:2765 com.android.server.wm.Session.remove:192 11-24 07:03:40.818 26069-26107/com.library_app2 V/Process: killProcess [26069] Callers=com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException:99 java.lang.ThreadGroup.uncaughtException:693 java.lang.ThreadGroup.uncaughtException:690 <bottom of call stack> 11-24 07:03:40.818 26069-26107/com.library_app2 I/Process: Sending signal. PID: 26069 SIG: 911-24 07:03:40.818 298-298/? E/lowmemorykiller: Error writing /proc/26069/oom_score_adj; errno=2211-24 07:03:40.828 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.838 15968-15988/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.868 15968-15988/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.868 15968-15987/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.878 1022-1042/? I/WindowState: WIN DEATH: Window{39362e65 u0 com.library_app2/com.library_app2.MainActivity}11-24 07:03:40.878 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.878 1022-1984/? I/ActivityManager: Process com.library_app2 (pid 26069) has died11-24 07:03:40.888 1022-1984/? D/ActivityManager: cleanUpApplicationRecordLocked app:ProcessRecord{3a5807bc 26069:com.library_app2/u0a343}, restarting:false, allowRestart:true, index:-111-24 07:03:40.888 1022-1984/? D/ActivityManager: cleanUpApplicationRecordLocked from:com.android.server.am.ActivityManagerService.handleAppDiedLocked:4985 com.android.server.am.ActivityManagerService.appDiedLocked:5164 com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied:1373 android.os.BinderProxy.sendDeathNotice:551 11-24 07:03:40.888 1022-1984/? D/ActivityManager: cleanUpApplicationRecordLocked:goodbye proc com.library_app211-24 07:03:40.888 1022-1984/? D/ActivityManager: resumeTopActivityLocked: set keepResume to true.11-24 07:03:40.888 15968-15988/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.898 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.908 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.918 1022-2005/? V/WindowManager: Changing focus from null to Window{1786b351 u0 com.oppo.launcher/com.oppo.launcher.Launcher} Callers=com.android.server.wm.WindowManagerService.relayoutWindow:3446 com.android.server.wm.Session.relayout:202 android.view.IWindowSession$Stub.onTransact:273 com.android.server.wm.Session.onTransact:130 11-24 07:03:40.918 15968-15988/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.918 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.928 1022-2721/? W/InputMethodManagerService: Got RemoteException sending setActive(false) notification to pid 26069 uid 1034311-24 07:03:40.938 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.938 15968-15987/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.948 15968-15987/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.948 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.948 15968-15987/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.968 15968-15999/? D/KeyguardViewMediator: setOccluded false11-24 07:03:40.968 15968-15987/? D/KeyguardViewMediator: setOccluded false11-24 07:03:41.378 567-567/? I/MSM-irqbalance: Decided to move IRQ215 from CPU4 to CPU511-24 07:03:41.408 15968-15987/? D/KeyguardViewMediator: setOccluded false11-24 07:03:41.408 15968-15968/? D/KeyguardViewMediator: handleKeyguardVisibilityChanged mKeyguardViewManager = com.android.keyguard.KeyguardViewManager@12d6678211-24 07:03:41.408 15968-15968/? D/KeyguardViewManager: handleKeyguardVisibilityChanged showing = true11-24 07:03:41.408 15968-15988/? D/KeyguardViewMediator: setOccluded false11-24 07:03:41.418 15968-15987/? D/KeyguardViewMediator: setOccluded false11-24 07:03:42.778 2531-2531/? W/InputConnectionWrapper.ICC: Timed out waiting on IInputContextCallback11-24 07:03:42.798 2531-2531/? E/FullInputEventModel: onStartInput event aborted: dwa: could not obtain extracted text (class dwa)11-24 07:03:42.798 2531-2531/? D/ANR_LOG: >>>ANR MAY HAPPEN!!!<<<11-24 07:03:42.798 2531-2531/? D/ANR_LOG: >>>History msg List is:11-24 07:03:42.798 2531-2531/? D/ANR_LOG: History msg <1> { when=-2s24ms what=32 target=com.android.internal.os.HandlerCaller$MyHandler }, cost = 2024 ms11-24 07:03:42.798 2531-2531/? D/ANR_LOG: History msg <2> { when=0 what=45 target=com.android.internal.os.HandlerCaller$MyHandler arg1=1 }, cost = 0 ms11-24 07:03:42.798 2531-2531/? D/ANR_LOG: History msg <3> { when=0 what=45 target=com.android.internal.os.HandlerCaller$MyHandler }, cost = 0 ms11-24 07:03:42.798 2531-2531/? D/ANR_LOG: History msg <4> { when=-1ms what=20 target=com.android.internal.os.HandlerCaller$MyHandler }, cost = 1 ms11-24 07:03:42.798 2531-2531/? D/ANR_LOG: History msg <5> { when=-3ms what=40 target=com.android.internal.os.HandlerCaller$MyHandler }, cost = 3 ms11-24 07:03:42.798 2531-2531/? D/ANR_LOG: History msg <6> { when=-1ms what=30 target=com.android.internal.os.HandlerCaller$MyHandler }, cost = 0 ms11-24 07:03:42.798 2531-2531/? D/ANR_LOG: History msg <7> { when=0 what=110 target=com.android.internal.os.HandlerCaller$MyHandler }, cost = 0 ms11-24 07:03:42.798 2531-2531/? D/ANR_LOG: History msg <8> { when=-21ms what=32 target=com.android.internal.os.HandlerCaller$MyHandler }, cost = 21 ms11-24 07:03:42.798 2531-2531/? D/ANR_LOG: History msg <9> { when=0 what=45 target=com.android.internal.os.HandlerCaller$MyHandler arg1=1 }, cost = 0 ms11-24 07:03:42.798 2531-2531/? D/ANR_LOG: History msg <10> { when=0 what=45 target=com.android.internal.os.HandlerCaller$MyHandler }, cost = 0 ms11-24 07:03:42.798 2531-2531/? D/ANR_LOG: >>>HISTORY MSG DUMP OVER<<<11-24 07:03:42.798 2531-2531/? D/ANR_LOG: >>>Current msg List is:11-24 07:03:42.798 2531-2531/? D/ANR_LOG: Current msg <1>  = { when=-1s923ms what=110 target=com.android.internal.os.HandlerCaller$MyHandler }11-24 07:03:42.798 2531-2531/? D/ANR_LOG: Current msg <2>  = { when=-1s858ms what=30 target=com.android.internal.os.HandlerCaller$MyHandler }11-24 07:03:42.798 2531-2531/? D/ANR_LOG: Current msg <3>  = { when=-1s857ms what=20 target=com.android.internal.os.HandlerCaller$MyHandler obj=InputBinding{android.os.BinderProxy@39230931 / uid 10059 / pid 2779} }11-24 07:03:42.798 2531-2531/? D/ANR_LOG: Current msg <4>  = { when=-1s857ms what=45 target=com.android.internal.os.HandlerCaller$MyHandler arg1=1 obj=android.inputmethodservice.InputMethodService$InputMethodSessionImpl@3cbe03e4 }11-24 07:03:42.798 2531-2531/? D/ANR_LOG: Current msg <5>  = { when=-1s857ms what=32 target=com.android.internal.os.HandlerCaller$MyHandler obj=com.android.internal.os.SomeArgs@f70eec3 }11-24 07:03:42.798 2531-2531/? D/ANR_LOG: >>>CURRENT MSG DUMP OVER<<<11-24 07:03:42.798 2531-2531/? W/ResourceType: For resource 0x7f0b001d, entry index(29) is beyond type entryCount(23)11-24 07:03:43.218 2007-2007/? E/PhoneStatusBar: updateNotificationTitleText  preIsInsidePanelCanSlide =true,misInsidePanelCanSlide = true,misInsidePanelOpen = false

I have trying to figure out this few days, but no luck.

Please, any helps would be very appreciated.

How to add keystore to react native app to use firebase auth?

$
0
0

I am developing react native app I am trying to use firebase authentication with otp code from sms and it is work with ios, but not with android. In android I have such errorerror from firebaseI try to solve this issue like it is described hereI ran ./gradlew signingReport from android folder and found that I have error Error: Missing keystorescreen from terminalDoes anyone know how to solve this? Thanks!

Recommended .gitignore for react-native

$
0
0

I'm trying out react native and ejected into a full build environment. Sadly, the eject-script did not create a sensible .gitignore file.

Not knowing a lot about app-development, I wonder what directories I could .gitignore here?

I'm guessing:

  • android/build
  • android/app/build
  • android/.gradle/

Are these alright, or are there any more directories I should .gitignore?

react native nodejs window closes after cmd react-native run-android

$
0
0

I am a beginner in react-native. When I am running the command react-native run-android, the Node.js window opens for a while and then closes immediately. Please do help me.

React Native - Android - Red screen error showing on publicly released production app

$
0
0

According to RN docs this should be impossible but I'm getting a red screen error on my app downloaded from the playstore. The playstore version generally works fine but there was a null value on one of the screens and it popped a redscreen.

Definitely uploaded the release version of APK using Build --> Generate Signed Bundle/APK. I'm totally at a loss of where else to look as I can't find any mentions of similar situations through searches.

Build.gradle file looks like:

 buildTypes {        release {            minifyEnabled enableProguardInReleaseBuilds                signingConfig signingConfigs.release            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"        }        debug {    debuggable false}

Edit for additional steps I've tried:

Tried following this RN guide for releasing as well: https://reactnative.dev/docs/signed-apk-android to no avail.

Confirmed the apk I'm using is in-fact a release build using jarsigner -verify -verbose -certs my_application.apk

Testing using a console.error() just after I see the app load successfully and that consistently shows a red screen.

Viewing all 28468 articles
Browse latest View live


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