Skip to content

Build crash [Android] #17513

Description

@ershubhamgarg

Is this a bug report?

No

Have you read the Contributing Guidelines?

No

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 8.4.0
Yarn: 1.3.2
npm: 5.5.1
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.51.0 => 0.51.0

Target Platform: iOS (8.0)

Steps to Reproduce

Expected Behavior

my project should run.

Actual Behavior

Android build built successfully but crashing on Launch.

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

my Package.json looks like :

{
"name": "LuxSocial",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.0.0",
"react-native": "0.51.0",
"react-native-fcm": "^10.0.3",
"react-native-image-progress": "^1.0.1",
"react-native-iphone-x-helper": "^1.0.1",
"react-native-keyboard-aware-scroll-view": "^0.4.1",
"react-native-loading-spinner-overlay": "^0.5.2",
"react-native-modal-dropdown": "^0.5.0",
"react-native-read-more-text": "^1.0.0",
"react-native-router-flux": "^3.41.0",
"react-native-splash-screen": "^3.0.6",
"react-native-vector-icons": "^4.4.2",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0"
},
"devDependencies": {
"babel-jest": "21.2.0",
"babel-preset-react-native": "4.0.0",
"eslint": "^4.14.0",
"eslint-plugin-react": "^7.5.1",
"jest": "21.2.1",
"react-test-renderer": "16.0.0"
},
"jest": {
"preset": "react-native"
}
}

Activity

compojoom commented on Jan 10, 2018

@compojoom
Contributor

Look at android studio in the Logcat window - you should have the exact crash message. Nobody will be able to help you without it.

ershubhamgarg commented on Jan 11, 2018

@ershubhamgarg
Author

@compojoom I looked at the logcat in android studio. It keeps on running and I am totally unable to understand it. Please help.

ershubhamgarg commented on Jan 11, 2018

@ershubhamgarg
Author

I guess this is the error we are looking for :

01-11 10:38:20.420 15454-15454/com.luxsocial E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.luxsocial, PID: 15454
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.luxsocial/com.luxsocial.MainActivity}: java.lang.UnsupportedOperationException: Can't convert value at index 35 to color: type=0x1
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2984)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
Caused by: java.lang.UnsupportedOperationException: Can't convert value at index 35 to color: type=0x1
at android.content.res.TypedArray.getColor(TypedArray.java:480)
at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:2604)
at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2921)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:449)
at android.app.Dialog.setContentView(Dialog.java:748)
at org.devio.rn.splashscreen.SplashScreen$1.run(SplashScreen.java:32)
at android.app.Activity.runOnUiThread(Activity.java:6058)
at org.devio.rn.splashscreen.SplashScreen.show(SplashScreen.java:26)
at org.devio.rn.splashscreen.SplashScreen.show(SplashScreen.java:47)
at com.luxsocial.MainActivity.onCreate(MainActivity.java:15)
at android.app.Activity.performCreate(Activity.java:6955)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045) 
at android.app.ActivityThread.-wrap14(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.app.ActivityThread.main(ActivityThread.java:6776) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) 

ershubhamgarg commented on Jan 11, 2018

@ershubhamgarg
Author

Got the issue. There is a Fatal exception in Splash screen. I have used react-native-splash-screen. Can someone help me with this ?

@compojoom Thanks for your help.

BigPun86 commented on May 3, 2018

@BigPun86

@ershubhamgarg did you fix it? I am facing the same issue without using react-native-splash-screen :)

locked as resolved and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions