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

ReactNative Android app crash. Error while updating property padding in shadow node of type: RCTView

$
0
0

This is the error I get

enter image description here

Few things are bugging me here.

This crash is happening at random times, in development, and when the app is built for production.

I found out that problem might be because values for properties like padding and margin are set as strings rather than integers. This is not a problem in my case, because all of them are set as integers.

I was thinking that it might be an SVG problem, but they don't have any inline style set that would cause this. Or maybe it could be something else with SVG images.

Content is loaded from WordPress using react-native-render-html but I don't think that this could be the problem.

I am using "react-native": "0.63.3",

If anyone could help me out it would be great :)


Problem with TouchableOpacity, negative margin and Android - React Native

$
0
0

I'm with a problem with TouchableOpacity and Negative Margins inside a FlatList. On iOS works well, but on Android, when I click at the TouchableOpacity in the front of other TochableOpacity, the TouchableOpacity from behind fires. I don't know how to solve this.

iOS Image

I clicked at "Proposta 70" but fires "Proposta 78" from behind.Android Image

The FlatList code

<View style={styles.containerList}><FlatList      data={proposalsList}      keyExtractor={item => item.proposta_id}      renderItem={({ item, index }) => (<RenderItem          item={item}          index={index}          isLoweredCard={            openedCardIndex !== null && index === openedCardIndex + 1          }          changeOpenedCardIndex={changeOpenedCardIndex}        />      )}      refreshing={loading}      onRefresh={() => getProposalsAndNotifications()}    /></View>

The RenderItem code

<TouchableOpacity  style={styles.container(index, isLoweredCard)}  onPress={() => changeOpenedCardIndex(index)}><><View      style={[        styles.lineContainer,        { marginBottom: metrics.padding * 1.5 },      ]}><View        style={{          width: '50%',        }}><Text style={styles.proposalId}>          {`Proposta ${item.proposta_id}`}</Text><Text style={styles.proposalDate}>          {dayjs(item?.proposta_data_criacao).format('DD.MM.YYYY')}</Text></View><View        style={{          flex: 1,          justifyContent: 'center',          alignItems: 'flex-end',        }}><View style={styles.statusContainer}><Text style={{ fontSize: wp(4), fontWeight: 'bold' }}><TypeStatus status={item?.proposta_status} /></Text></View></View></View><View style={styles.lineContainer}><Text style={styles.proposalDetailLabel}>Valor solicitado</Text><Text style={styles.proposalDetailValue}>        {formatCurrency(item?.proposta_valor_financiado)}</Text></View><View style={styles.lineContainer}><Text style={styles.proposalDetailLabel}>Valor liberado</Text><Text style={styles.proposalDetailValue}>        {formatCurrency(item?.proposta_valor_financiado)}</Text></View><View style={styles.lineContainer}><Text style={styles.proposalDetailLabel}>Parcelas</Text><Text style={styles.proposalDetailValue}>        {`${item?.proposta_valor_prazo}x`}</Text></View><View style={styles.lineContainer}><Text style={styles.proposalDetailLabel}>Valor da parcela</Text><Text style={styles.proposalDetailValue}>        {formatCurrency(item?.proposta_valor_parcela)}</Text></View><View style={styles.buttonContainer}><Button        onPress={goToDetails}        title="Ver detalhes"        titleStyle={styles.proposalButtonText}        style={styles.button}      /></View></></TouchableOpacity>

And the style of items

import {widthPercentageToDP as wp,heightPercentageToDP as hp,} from 'react-native-responsive-screen';import { metrics, colors } from '../../../../constants';const styles = StyleSheet.create({container: (index, isLoweredCard) => ({ backgroundColor: `#00${index}F${index}C`, marginTop: !isLoweredCard && index !== 0 ? -wp(53) : metrics.padding, marginHorizontal: metrics.padding, alignContent: 'center', padding: metrics.padding, borderRadius: metrics.radius, zIndex: -(index + 999),}),lineContainer: { width: '100%', justifyContent: 'space-between', flexDirection: 'row', marginBottom: metrics.padding / 2,},statusContainer: { backgroundColor: colors.white, borderRadius: 20, width: '70%', paddingVertical: 3, alignItems: 'center', justifyContent: 'center',},proposalId: { color: colors.white, fontWeight: 'bold', fontSize: wp(4.5),},proposalDate: { color: 'rgba(0, 0, 0, 0.5)', fontWeight: 'bold', fontSize: wp(3.5),},proposalDetailLabel: { fontSize: wp(4), color: 'rgba(0, 0, 0, 0.9)',},proposalDetailValue: { fontSize: wp(4.5), color: colors.white, fontWeight: 'bold',},proposalButtonText: { color: colors.white, fontWeight: 'bold', fontSize: wp(4),},button: { borderRadius: metrics.radius, backgroundColor: '#002F6C', paddingHorizontal: metrics.padding * 3,},buttonContainer: { width: '100%', marginTop: metrics.padding, alignItems: 'center',},});export default styles;

How can I fetch metadata for all audio files from a specific folder on my SD Card using React Native?

$
0
0

I am working on an audio playing app using React Native, but I'm having trouble fetching files using a file/folder picker. Basically, I have audio files saved in a certain folder on my device (not in the project directory). I want to fetch files using https://www.npmjs.com/package/react-native-document-picker or folders using react-native-directory-picker (or something like these), and fetch the metadata including uri, to react-native-track-player, but the url fetched by the file picker doesn't seem to work with the track player. Is there a better way to go about this?

How to get ApplicationContext in ReactContextBaseJavaModule?

$
0
0

I am building a React Native Application, in a react native module in Android code I wish to access the path for cache files used by Android code.

At some point I am writing (from the native code) a json file in the cache of the app data, I use getApplicationContext() to get the context and apply getCacheDir() to get the path of the cache files.

In a class extending ReactContextBaseJavaModule I want to access the Application context to get the cache files path, but when invoking getApplicationContext() on the React context and using getCacheDir() the path returned is not the same as the one returned before.

What is the way to get the Global context in a react native module ?

Cheers

Registration and understanding JSON response through fetch

$
0
0

I am relatively new to React Native, I have been following a course and reading through the documentation. But for some reason I can't wrap my head around how to receive information from a POST request. In the following code, I am trying to POST to my test server, but I have no idea if I am getting through because I don't know how to receive the data back.

It took me a long while to figure out how to actually send the information (if that's even correct, my console log just tells me it is what I want it to be).

Here is my code. Let me know if I need to provide any other info.

Thanks!

import { NavigationContainer } from '@react-navigation/native';import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';import {View, Text, StyleSheet, TextInput, Button, Alert} from 'react-native';import * as SecureStore from 'expo-secure-store';export default class Registration extends Component {    constructor(props) {      super(props);      this.state = {        username: '',        email: '',        password: '',      };    }    submitRegistration = () => {        const { username, email, password } = this.state;        console.log(this.state)        fetch('https://toyshelf-api.herokuapp.com/api/auth/register', {          method: 'POST',          headers: {'Accept': 'application/json','Content-Type': 'application/json',          },          body: JSON.stringify({            username: this.state.username,            email: this.state.email,            password: this.state.password          }).then((response) => response.json())          .then((json) => {return data.names}).catch((error) => {console.log(error)})        });    };    render() {        return (<View style={style.container}><Text style={style.title} >Registration</Text><TextInput                     style={style.input}                    value={this.state.username}                    placeholder="username"                    onChangeText={(username) => this.setState({ username })}                /><TextInput                     style={style.input}                     value={this.state.email}                    placeholder="email"                    onChangeText={(email) => this.setState({ email })}                /><TextInput                     style={style.input}                     value={this.state.password}                    placeholder="password"                    autoCapitalize="none"                    autoCorrect={false}                    onChangeText={(password) => this.setState({ password })}                /><Button title='Register' onPress={this.submitRegistration.bind(this)}/></View>        )    };};const style = StyleSheet.create({    container: {        flex: 1,        padding: 24,        backgroundColor: "#eaeaea",        marginTop: 24    },    title: {        marginTop: 16,        paddingVertical: 8,        borderWidth: 4,        borderColor: "#20232a",        borderRadius: 6,        backgroundColor: "#9bc2cf",        color: "#20232e",        textAlign: "center",        fontSize: 30,        fontWeight: "bold"      },      input: {        marginTop: 16,        paddingVertical: 8,        borderWidth: 4,        borderColor: "#20232a",        borderRadius: 6,        backgroundColor: "#61dafb",        color: "#20232a",        textAlign: "center",        fontSize: 30,        fontWeight: "bold"      }});```

Android tv box (TX3 mini) run app without connecting display

$
0
0

I am trying to use my android tv box (TX3 mini) like a radio. The app I build using react native and expo work and the audio does play when the app is in the background. The audio is coming through AV port and not through HDMI. However when I unplug the HDMI after launching the app, the audio stop working. Is this setting i have to configure in the Android box to keep the audio and the app running when HDMI (display) is unplug or something i have set in my app when coding? I look for setting in the code, but could not find one.

I am using import { Audio } from 'expo-av' library.

Audio settings:

await Audio.setAudioModeAsync({    allowsRecordingIOS: false,    interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX,    playsInSilentModeIOS: true,    interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX,    shouldDuckAndroid: true,    staysActiveInBackground: true,    playThroughEarpieceAndroid: true  });

Once the app is running i want to disconnect the display and keep the audio playing on the speaker.

Let me know if you need more details and thanks for any input.

Thanks,A

small icon on push notification not showing on android?

$
0
0

I have added small icon in push notification but still not showing. I am using android 10 emulator. My icon have fulfill requirement that using white color with no background and store in mipmap folder. I have tried some solution on previous same question on stackoverflow but still not working.this is my code

NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(                context, CHANNEL_ID)                .setSmallIcon(R.mipmap.ic_notification)                .setContentTitle(contentTitle)                .setContentText(contentText)                .setContentIntent(pendingIntent)                .setPriority(NotificationCompat.PRIORITY_DEFAULT)                .setAutoCancel(true);

Push notification icon still showing like thisenter image description here

I have tried add this code on android manifest but still not working too

<meta-data    android:name="com.google.firebase.messaging.default_notification_icon"    android:resource="@mipmap/ic_notification" />

Did you ever encounter same issues and solved ?

I want to use react-native-notifications for local notifications only, but the app crashes without a firebasebase configuration, what should I do?

$
0
0

I want to be able to schedule local notifications, and don't need remote push notifications. I was using react-native-push-notification for the same, but for some reason, I can't get a notification using that too. There is no error log for that. So I decided to switch over to react-native-notifications but the app crashes without firebase configuration, is there a fix around it?To recreate issuemake a new app using

npx react-native init notifications

add react-native-notifications packageand run the appit builds successfully but crashes before rendering anythingthis is the error I am getting in

adb logcat *:E

enter image description here


How to handle async function response in react native and save in useState?

$
0
0
const [confirm, setConfirm] = useState(null);const signIn = async phoneNumber => {  console.log('Entered into signIn Function');  setTextInputState(false);  setSendOtpButtonState(true);  const confirmation = await auth().signInWithPhoneNumber(phoneNumber);  console.log('This is conformation1'+ JSON.stringify(confirmation));  setSendOtpButtonState(true);  setOtpInputState(true);  let res = confirmation;  setConfirm(res);  console.log('This is conformation2'+ JSON.stringify(confirm));};

How to set conformation in the useState . when we enter into the signIn function for the first time getting useState value as null and for the second time setting the value in the useState . i want to set value for the first time.

What should i do to apply changes on app if i make changes on AndroidManifest.xml?

$
0
0

I make code changes on AndroidManifest.xml by adding some tag and refactoring some code but when i run the app i not see the changes. is it need rebuild android project ? Did you know what step by step after editing AndroidManifest.xml to make changes work ?

Is there a way to emit byte[] to React Native JS Bridge and vice versa?

$
0
0

I am thinking to build a custom view to handle the WebSocket, STOMP, AudioRecorder, AudioPlayer inside the Java directly instead of JS bridge -> Java, if you know how to create a custom View and integrate it with React Navigation, please let me know

My goal is to record audio data -> transmit it to a WebSocket endpoint.Another device will receive the data from the WebSocket endpoint -> play the audio data. without the need to convert the audio data from byte[] -> WritableArray / String for recording audio, and for playing the audio from a websocket String -> byte[]

The current solution for the Audio Recorder:

  1. Record the audio data in byte[].
  2. Convert the audio data to WritableArray / String.
  3. Emit it to the JS Bridge.
  4. Send the audio data to the WebSocket endpoint.

The current solution for the Audio Player:

  1. Receive the audio data from a WebSocket endpoint.
  2. Run a ReactMethod with the audio data as the parameter, e.g await AudioPlayerModule.streamAndLoadAsync(audioData).
  @ReactMethod  public void streamAndPlayAsync(String data, final Promise promise) {    byte[] audioData = Base64.decode(data, Base64.NO_WRAP);    audioTrack.play();    audioTrack.write(audioData, 0, audioData.length);    audioTrack.stop();    promise.resolve(null);  }
  1. Convert the audio data to byte[].
  2. Play the audio.

My expected result is the audio data played smoothly.

My actual result:

  1. 512 MB, virtual device, it sounds like the audio is played at 0.25 speed.
12-30 16:04:00.994 4740-4785/com.satpam I/ReactNativeJS: startAudioRecordingAsync()12-30 16:04:01.264 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 363K, 42% free 6435K/10951K, paused 1ms+1ms, total 5ms12-30 16:04:01.734 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 400K, 42% free 6429K/10951K, paused 12ms+12ms, total 29ms12-30 16:04:02.174 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 380K, 42% free 6434K/10951K, paused 1ms+1ms, total 7ms12-30 16:04:02.744 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 378K, 42% free 6447K/10951K, paused 12ms+12ms, total 30ms12-30 16:04:03.194 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 396K, 42% free 6446K/10951K, paused 12ms+1ms, total 18ms12-30 16:04:03.694 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 381K, 42% free 6458K/10951K, paused 11ms+1ms, total 20ms12-30 16:04:04.214 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 387K, 42% free 6459K/10951K, paused 12ms+11ms, total 33ms12-30 16:04:05.044 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 391K, 41% free 6482K/10951K, paused 14ms+21ms, total 127ms12-30 16:04:05.384 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 408K, 41% free 6479K/10951K, paused 15ms+3ms, total 78ms12-30 16:04:05.894 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 396K, 41% free 6495K/10951K, paused 12ms+5ms, total 29ms12-30 16:04:06.284 4740-4785/com.satpam I/ReactNativeJS: stopAudioRecordingAsync()12-30 16:04:06.804 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 395K, 41% free 6489K/10951K, paused 12ms+15ms, total 39ms12-30 16:04:07.484 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 395K, 41% free 6496K/10951K, paused 12ms+14ms, total 35ms12-30 16:04:07.924 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 403K, 41% free 6478K/10951K, paused 12ms+1ms, total 23ms12-30 16:04:09.034 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 394K, 41% free 6474K/10951K, paused 14ms+4ms, total 31ms12-30 16:04:09.854 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 391K, 41% free 6467K/10951K, paused 11ms+0ms, total 15ms12-30 16:04:11.024 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 397K, 41% free 6462K/10951K, paused 13ms+14ms, total 45ms12-30 16:04:12.824 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 408K, 42% free 6444K/10951K, paused 1ms+0ms, total 10ms12-30 16:04:14.764 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 392K, 42% free 6439K/10951K, paused 13ms+12ms, total 35ms12-30 16:04:16.774 4740-4744/com.satpam D/dalvikvm: GC_CONCURRENT freed 403K, 42% free 6432K/10951K, paused 17ms+20ms, total 67ms
  1. 6 GB, real device, the audio played smoothly.

Error type 3. Activity class {com.awesome_project/ com.awesome_project.MainActivity} does not exist in react native (Android device)

$
0
0

I've created the project using the following command.

react-native init Awesome_Project

I've started the packager using the following command.

react-native start

I've connected my Android mobile using USB drive.

I've opened another command prompt and run the following adb command to make sure that only one device is connected.

adb devices

I've started the application using the following command.

react-native run-android

I've been confronted with the following error.

open: Permission deniedopen: Permission deniedStarting: Intent { com.awesome_project/.MainActivity }Error type 3Error: Activity class {com.awesome_project/ com.awesome_project.MainActivity} does not exist.

Thanks in advance.

Malformed calls from JS : field sizes are different [[8,39],[4,0]

$
0
0

I want to display the list of contacts on my AVD but Im facing an error (I tried linking the package but it did nothing):

My code :

    const [contact, setContact] = useState([]);    useEffect(() => {      PermissionsAndroid.request(        PermissionsAndroid.PERMISSIONS.READ_CONTACTS,        {'title': 'Contacts','message': 'This app would like to view your contacts.'        }      ).then(() => {        Contacts.getAll((err, contacts) => {          if (err === 'denied'){            // error          } else {            // contacts returned in Array            setContact(contacts);            console.log(contact);          }        })      })      .catch((err)=> {          console.log(err);      })    }, []);

The error :

enter image description here

I searched everywhere for a solution but there's nothing about this issue, thanks for helping me by advance.

Ignore Ssl Certificate Verifiaction in react native

$
0
0

I am working on a app which uses rest api to get it connected to database and my server has SSL certificate and from my react native app when i am trying to send the request it shows this error msg is there is a way to disable SSl verification in react native for android.

If anyone knows, help.

Unsupported path storage/emulated/0/test

$
0
0

Hi I am working on a mobile application (react native 0.60.4) where I am downloading file using rn-fetch-blob to a custom pathstorage/emulated/0/testearlier it was working fine then I had to update the targetSDKVersion to 29 and compileSDKVersion to 29 after that it stopped working in android 10Even after adding android:requestLegacyExternalStorage="true" its not working..

can someone help me what could be the work around for this to work.or any other library to use with DownloadManager with notification

TIA


React native square logo not showing perfect

Expo build crashed when using "enableDangerousExperimentalLeanBuilds"

$
0
0

I'm pretty much new to react native currently i'm developing a small app to get a better idea on this using expo. But when i build the apk files it goes up to 53 mb which makes no sense because app has only limited functionalities. After i searched in google i found that by adding this "enableDangerousExperimentalLeanBuilds" : true to the app.json file will reduce the app size. But after i adding this to the app.json file app build got error. I don't know how to fix this. Also is there any way to reduce the app size.

This is tha app.json file

{"expo": {"name": "ceculator","slug": "ceculator","version": "1.0.0","orientation": "portrait","icon": "./assets/icon.png","updates": {"fallbackToCacheTimeout": 0    },"assetBundlePatterns": ["**/*"    ],"ios": {"supportsTablet": true    },"android": {"adaptiveIcon": {"foregroundImage": "./assets/adaptive-icon.png","backgroundColor": "#FFFFFF"      },"package": "com.ceculator","enableDangerousExperimentalLeanBuilds" : true    },"web": {"favicon": "./assets/favicon.png"    }  }}

This is the error log

    Wed, 30 Dec 2020 12:15:12 GMT[stderr] /app/turtle/workingdir/android/sdk40/android-shell-app/app/src/main/java/host/exp/exponent/generated/AppConstants.java:8: error: package expo.modules.splashscreen does not existWed, 30 Dec 2020 12:15:12 GMT[stderr] import expo.modules.splashscreen.SplashScreenImageResizeMode;Wed, 30 Dec 2020 12:15:12 GMT[stderr]                                 ^Wed, 30 Dec 2020 12:15:12 GMT[stderr] /app/turtle/workingdir/android/sdk40/android-shell-app/app/src/main/java/host/exp/exponent/generated/AppConstants.java:25: error: cannot find symbolWed, 30 Dec 2020 12:15:12 GMT[stderr]   public static SplashScreenImageResizeMode SPLASH_SCREEN_IMAGE_RESIZE_MODE = SplashScreenImageResizeMode.CONTAIN;Wed, 30 Dec 2020 12:15:12 GMT[stderr]                 ^Wed, 30 Dec 2020 12:15:12 GMT[stderr]   symbol:   class SplashScreenImageResizeModeWed, 30 Dec 2020 12:15:12 GMT[stderr]   location: class AppConstantsWed, 30 Dec 2020 12:15:12 GMT[stderr] /app/turtle/workingdir/android/sdk40/android-shell-app/app/src/main/java/host/exp/exponent/generated/AppConstants.java:25: error: cannot find symbolWed, 30 Dec 2020 12:15:12 GMT[stderr]   public static SplashScreenImageResizeMode SPLASH_SCREEN_IMAGE_RESIZE_MODE = SplashScreenImageResizeMode.CONTAIN;Wed, 30 Dec 2020 12:15:12 GMT[stderr]                                                                               ^Wed, 30 Dec 2020 12:15:12 GMT[stderr]   symbol:   variable SplashScreenImageResizeModeWed, 30 Dec 2020 12:15:12 GMT[stderr]   location: class AppConstantsWed, 30 Dec 2020 12:15:12 GMT[stderr] /app/turtle/workingdir/android/sdk40/android-shell-app/app/src/main/java/host/exp/exponent/generated/AppConstants.java:53: error: cannot access SplashScreenImageResizeModeWed, 30 Dec 2020 12:15:12 GMT[stderr]     constants.SPLASH_SCREEN_IMAGE_RESIZE_MODE = SPLASH_SCREEN_IMAGE_RESIZE_MODE;Wed, 30 Dec 2020 12:15:12 GMT[stderr]                                               ^Wed, 30 Dec 2020 12:15:12 GMT[stderr]   class file for expo.modules.splashscreen.SplashScreenImageResizeMode not foundWed, 30 Dec 2020 12:15:13 GMT[stderr] 4 errorsWed, 30 Dec 2020 12:15:13 GMT> Task :app:compileReleaseJavaWithJavac FAILEDWed, 30 Dec 2020 12:15:13 GMT> Task :app:mergeReleaseNativeLibsWed, 30 Dec 2020 12:15:13 GMT> Task :app:mergeReleaseJavaResourceWed, 30 Dec 2020 12:15:13 GMTDeprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.Wed, 30 Dec 2020 12:15:13 GMTUse '--warning-mode all' to show the individual deprecation warnings.Wed, 30 Dec 2020 12:15:13 GMTSee https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warningsWed, 30 Dec 2020 12:15:13 GMT20 actionable tasks: 20 executedWed, 30 Dec 2020 12:15:13 GMT[stderr] FAILURE: Build failed with an exception.Wed, 30 Dec 2020 12:15:13 GMT[stderr] * What went wrong:Wed, 30 Dec 2020 12:15:13 GMT[stderr] Execution failed for task ':app:compileReleaseJavaWithJavac'.Wed, 30 Dec 2020 12:15:13 GMT[stderr] > Compilation failed; see the compiler error output for details.Wed, 30 Dec 2020 12:15:13 GMT[stderr] * Try:Wed, 30 Dec 2020 12:15:13 GMT[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.Wed, 30 Dec 2020 12:15:13 GMT[stderr] * Get more help at https://help.gradle.orgWed, 30 Dec 2020 12:15:13 GMT[stderr] BUILD FAILED in 2m 49sWed, 30 Dec 2020 12:15:26 GMTError: ./gradlew exited with non-zero code: 1    at ChildProcess.completionListener (/app/turtle/node_modules/@expo/xdl/node_modules/@expo/spawn-async/build/spawnAsync.js:52:23)    at Object.onceWrapper (events.js:418:26)    at ChildProcess.emit (events.js:311:20)    at ChildProcess.EventEmitter.emit (domain.js:482:12)    at maybeClose (internal/child_process.js:1021:16)    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)    ...    at spawnAsync (/app/turtle/node_modules/@expo/xdl/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)    at spawnAsyncThrowError (/app/turtle/node_modules/@expo/xdl/build/detach/ExponentTools.js:201:45)    at buildShellAppAsync (/app/turtle/node_modules/@expo/xdl/build/detach/AndroidShellApp.js:975:11)    at async Object.createAndroidShellAppAsync (/app/turtle/node_modules/@expo/xdl/build/detach/AndroidShellApp.js:396:5)    at async runShellAppBuilder (/app/turtle/build/builders/android.js:95:9)    at async Object.buildAndroid [as android] (/app/turtle/build/builders/android.js:43:28)    at async build (/app/turtle/build/jobManager.js:181:33)    at async processJob (/app/turtle/build/jobManager.js:118:32)    at async Object.doJob (/app/turtle/build/jobManager.js:49:5)    at async main (/app/turtle/build/server.js:66:13)

Error Execution failed for task ':app:mergeReleaseResources' building APK

$
0
0

After trying to build APK once and fixing an error, I got an error executing ./gradlew assembleRelease again: Execution failed for task ':app:mergeReleaseResources' building APK

Language translate in react native in offline mode

$
0
0

How do we implement language translation in offline react native app ?

We are developing a mobile app with react native.

Our app users have very limited internet connectivity and we want to implement language translation feature ?

How can we approach this project ?

socketException: Connection reset in react native then app freezes

$
0
0

I have got an issue that makes the app freeze, As I reload the app it will work normally.I tried debugging and it happens in these cases:

  1. If I put the app in the background and use other apps.
  2. Lock the phone, unlock it, and back to the app again.

Error message : java.net.socketException: Connection reset

Actions : try add network_security_config file to android manifest : android:networkSecurityConfig="@xml/network_security_config"

"react": "16.8.6",

"react-native": "^0.60.5",

"socket.io": "^2.2.0",

"socket.io-client": "^2.3.0",

How can I find the cause? and also how can I resolve it?

Viewing all 29632 articles
Browse latest View live


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