0

I spent almost all day trying to figure it out I am not able to do so .

My project is all good when I deploy it in release mode when I try debug mode it just throws exception .

enter image description here

things I have tried in debug mode .

1 ) cleaned bin and debug and then run ,failed 2 ) checked for textview in splash screen removed it ,failed 3 ) changed my phone and used different phone it worked . 4 ) removed splash screen and launched directly an activity failed

I am using Motorola g5 plus

Any help would be highly appreciated . This is the first activity that I m loading

    <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:local="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:background="#FAF9F7"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <TextView
        android:text="Welcome, Horace"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="16dp"
        android:textColor="#525252"
        android:gravity="bottom|center"
        android:id="@+id/textView1"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="36dp"
        android:layout_marginLeft="30dp"
        android:layout_marginRight="30dp" />
    <TextView
        android:text="Are you ready to contribute your relationship information from Outlook so we can provide you with additional insights about your accounts, contacts and daily schedule?"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="16dp"
        android:textColor="#444444"
        android:gravity="center"
        android:id="@+id/ShareTitleText"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="30dp"
        android:layout_marginRight="40dp"
        android:layout_marginLeft="40dp" />
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:gravity="bottom|center">
        <ImageView
            android:id="@+id/intro_img"
            android:layout_width="360dp"
            android:layout_height="180dp"
            android:src="@drawable/contacts_selection_intro" />
    <!-- <Button
            android:text="Join the Lens Community"
            android:textSize="14dp"
            android:layout_width="fill_parent"
            android:layout_height="65dp"
            android:id="@+id/joinBtn"
            android:layout_marginBottom="0dp"
            android:layout_marginTop="0dp"
            android:layout_marginLeft="0dp"
            android:layout_marginRight="0dp"
            android:textColor="#FFFFFF"
            android:background="#229DCF" />
        <Button
            android:text="@string/stylish_text"
            android:textSize="14dp"
            android:layout_width="fill_parent"
            android:layout_height="65dp"
            android:id="@+id/learnBtn"
            android:background="#000000"
            android:textColor="#FFFFFF"
            android:layout_marginBottom="0dp"
            android:layout_marginTop="0dp"
            android:layout_marginLeft="0dp"
            android:layout_marginRight="0dp" />-->
        <include
            layout="@layout/BarButton"
            android:id="@+id/joinBtn"
            android:layout_width="fill_parent"
            android:layout_height="65dp" />
        <include
            layout="@layout/BarButton"
            android:layout_width="fill_parent"
            android:id="@+id/learnBtn"
            android:layout_height="65dp" />
    </LinearLayout>
</LinearLayout>
Lex Li
  • 60,503
  • 9
  • 116
  • 147
Saket Kumar
  • 1,157
  • 2
  • 14
  • 30
  • And what does your layout contain? – SushiHangover Sep 14 '17 at 18:51
  • which layout , I have many layouts in project , after splash screen the next screen , oncreate itself is not getting called and exception occurs . this is only problem with Moto phone , I changed the phone to vivo or Samsung all fine . – Saket Kumar Sep 14 '17 at 19:59
  • Since it is throwing within a `LayoutInflater` reflection call, you are either using the wrong context or the layout that you are inflating contains a problem. But you need to determine the code that is causing the problem and add it to your question. Also do NOT post error messages as images, include the formatted text in your question. – SushiHangover Sep 14 '17 at 20:13
  • All seem to work with Samsung and vivo , context is just wrong for Moto that too only for debug mode is it ? – Saket Kumar Sep 14 '17 at 20:45
  • I will add axml file – Saket Kumar Sep 14 '17 at 20:49

0 Answers0