-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unfortunately App has stopped (crashed) #367
Comments
Can you put your stack trace ? |
this is the stack trace from logcat when i clicked the button that launches the camera: 10-23 19:45:29.315 1477-1489/system_process I/ActivityManager: START u0 {act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com.android.camera/.Camera clip={text/uri-list U:file:///storage/emulated/0/Pictures/image-0d228c2e-f13d-4863-88be-2b1929e6d233.jpg} (has extras)} from uid 10090 on display 0
10-23 19:45:29.523 2322-2322/com.android.camera V/camera: Preferred camera (id= 0) missing. Defaulting to the first one
10-23 19:45:36.689 19136-19136/com.nativestarterkit E/AndroidRuntime: FATAL EXCEPTION: main |
You have 2 errors The first one probably because you are on an emulator and the second one is a cordova issue |
Yes the first is due to the emulator and here is the onActivityResult in my mainActivity:
|
Thank you yfuks i solved the problem based on your help and it was due to overriding the onActivityResult. |
Hello everyone,
i had installed and implemented the react-native-image-picker correctly, but when testing it on the emulator or the device the app crashes badly and i get this error "Unfortunately app has stopped".
I'm using react native v0.31 / RN-image-picker latest version 0.22.10 / testing device (android 5), emulator (android 7).
Here is the settings.gradle:
`ootProject.name = 'NativeStarterKit'
include ':app'
include ':react-native-datetime'
project(':react-native-datetime').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-datetime/android')
include ':react-native-contacts'
project(':react-native-contacts').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-contacts/android')
include ':cordovaplugin'
project(':cordovaplugin').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-cordova-plugin/framework/android')
include ':react-native-datetime-picker'
project(':react-native-datetime-picker').projectDir = new File(rootProject.projectDir, '../node_modules/@remobile/react-native-datetime-picker/android')
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-splash-screen'
project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android')
include ':react-native-spinkit'
project(':react-native-spinkit').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-spinkit/android')
include ':react-native-image-picker'
project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android')
include ':react-native-fetch-blob'
project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')`
Here is the manifest file:
`
<Button style={{height:75, marginTop:50, marginLeft:40, width:75, borderRadius: 100/2}} onPress={() => this.launchCamera()}> <Icon name='camera' size={45} style={{color:'white'}}/> </Button>
` launchCamera() {
The text was updated successfully, but these errors were encountered: