0

I am Facing issues With My Android App The problem is its working fine above Lollipop. But Below Lollipop app crashes after launching the activity.

E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                Process: com.latestkinnaurisongs.kinnaurigeet, PID: 2274
                                                                                java.lang.RuntimeException: Unable to start activity ComponentInfo{com.latestkinnaurisongs.kinnaurigeet/com.latestkinnaurisongs.kinnaurigeet.SignIn}: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.constraint.ConstraintLayout
                                                                                    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
                                                                                    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
                                                                                    at android.app.ActivityThread.access$800(ActivityThread.java:135)
                                                                                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
                                                                                    at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                    at android.os.Looper.loop(Looper.java:136)
                                                                                    at android.app.ActivityThread.main(ActivityThread.java:5017)
                                                                                    at java.lang.reflect.Method.invokeNative(Native Method)
                                                                                    at java.lang.reflect.Method.invoke(Method.java:515)
                                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
                                                                                    at dalvik.system.NativeStart.main(Native Method)
                                                                                 Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.constraint.ConstraintLayout
                                                                                    at android.view.LayoutInflater.createView(LayoutInflater.java:621)
                                                                                    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
                                                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
                                                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
                                                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
                                                                                    at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
                                                                                    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
                                                                                    at com.latestkinnaurisongs.kinnaurigeet.SignIn.onCreate(SignIn.java:46)
                                                                                    at android.app.Activity.performCreate(Activity.java:5231)
                                                                                    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
                                                                                    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
                                                                                    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 
                                                                                    at android.app.ActivityThread.access$800(ActivityThread.java:135) 
                                                                                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
                                                                                    at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                    at android.os.Looper.loop(Looper.java:136) 
                                                                                    at android.app.ActivityThread.main(ActivityThread.java:5017) 
                                                                                    at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                                    at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 
                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 
                                                                                    at dalvik.system.NativeStart.main(Native Method) 
                                                                                 Caused by: java.lang.reflect.InvocationTargetException
                                                                                    at java.lang.reflect.Constructor.constructNative(Native Method)
                                                                                    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
                                                                                    at android.view.LayoutInflater.createView(LayoutInflater.java:595)
                                                                                    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697) 
                                                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:469) 
                                                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
                                                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
                                                                                    at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) 
                                                                                    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
                                                                                    at com.latestkinnaurisongs.kinnaurigeet.SignIn.onCreate(SignIn.java:46) 
                                                                                    at android.app.Activity.performCreate(Activity.java:5231) 
                                                                                    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
                                                                                    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) 
                                                                                    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 
                                                                                    at android.app.ActivityThread.access$800(ActivityThread.java:135) 
                                                                                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
                                                                                    at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                    at android.os.Looper.loop(Looper.java:136) 
                                                                                    at android.app.ActivityThread.main(ActivityThread.java:5017) 
                                                                                    at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                                    at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 
                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 
                                                                                    at dalvik.system.NativeStart.main(Native Method) 
                                                                                 Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f020054 a=-1 r=0x7f020054}
                                                                                    at android.content.res.Resources.loadDrawable(Resources.java:2073)
                                                                                    at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
                                                                                    at android.view.View.<init>(View.java:3554)
                                                                                    at android.view.View.<init>(View.java:3484)
                                                                                    at android.view.ViewGroup.<init>(ViewGroup.java:464)
                                                                                    at android.support.constraint.ConstraintLayout.<init>(ConstraintLayout.java:419)
                                                                                    at java.lang.reflect.Constructor.constructNative(Native Method) 
                                                                                    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
                                                                                    at android.view.LayoutInflater.createView(LayoutInflater.java:595) 
                                                                                    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697) 
                                                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:469) 
                                                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
                                                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
                                                                                    at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) 
                                                                                    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
                                                                                    at com.latestkinnaurisongs.kinnaurigeet.SignIn.onCreate(SignIn.java:46) 
                                                                                    at android.app.Activity.performCreate(Activity.java:5231) 
                                                                                    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
                                                                                    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) 
                                                                                    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 
                                                                                    at android.app.ActivityThread.access$800(ActivityThread.java:135) 
                                                                                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
                                                                                    at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                    at android.os.Looper.loop(Looper.java:136) 
                                                                                    at android.app.ActivityThread.main(ActivityThread.java:5017) 
                                                                                    at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                                    at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 
                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 
                                                                                    at dalvik.system.NativeStart.main(Native Method) 

Its my logcat of Error Can anyone please tell me whats Wrong With it and why this kind of behaviour in App.

Although it works On devices Above Lollipop But below that it crashes. What is the reason of crash ??

res hierarchy

click here

Here is my AndroidManifest contains

<application
    android:allowBackup="true"
    android:icon="@mipmap/ico"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name=".SignIn"
        android:label="@string/app_name"
        android:theme="@style/AppTheme.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

And activity_start.xml contains

<com.google.android.gms.common.SignInButton
    android:id="@+id/googleBtn"
    android:layout_width="0dp"
    android:layout_height="wrap_content"

    app:layout_constraintRight_toRightOf="parent"

    app:layout_constraintLeft_toLeftOf="parent"
    android:layout_marginStart="24dp"
    android:layout_marginEnd="24dp"
    android:layout_marginTop="8dp"
    app:layout_constraintBottom_toBottomOf="parent"
    android:layout_marginBottom="8dp"
    app:layout_constraintVertical_bias="0.898"
    android:layout_marginLeft="24dp"
    android:layout_marginRight="24dp"
    app:layout_constraintHorizontal_bias="1.0"
    app:layout_constraintTop_toTopOf="parent"></com.google.android.gms.common.SignInButton>

Its in a ConstraintLayout

<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/app_star3"
tools:context="com.latestkinnaurisongs.kinnaurigeet.SignIn"></android.support.constraint.ConstraintLayout>
DimKUsik
  • 33
  • 11

1 Answers1

0

I think you are using ConstraintLayout in your project, please check

Error inflating class ConstraintLayout

I hope it will help....

piyushpk
  • 91
  • 10