简体   繁体   中英

Error building release APK

today I wanted to build my application's release APK but AS didn't want to do this for me. It says:

Error:Execution failed for task ':mergeDebugResources'. Unsupported type 'TextView' in file C:\\Users\\Sven\\workspace\\Soest\\res\\layoutlarge\\kontakt_form_wiese.xml

That's all the Information I can find. Can you help me? I have to finish this project today and this is totally blowing me Off-Course...

UPDATE I just found out that Android Studio doesn't find the R.styleable.TextView in TextView.java. But I don't know why and until today everything worked fine...

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:text="Stadt Soest"
    android:id="@+id/textView4"
    android:layout_gravity="center"
    android:layout_marginTop="32dp"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true" />

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:text="Kinder- und Jugendzentrum"
    android:id="@+id/textView5"
    android:layout_gravity="center_horizontal"
    android:layout_below="@+id/textView4"
    android:layout_centerHorizontal="true" />

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:text="Hamburger Str. 29"
    android:id="@+id/textView6"
    android:layout_gravity="center_horizontal"

    android:layout_below="@+id/textView9"
    android:layout_centerHorizontal="true" />

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:text="59494 Soest"
    android:id="@+id/textView7"
    android:layout_gravity="center_horizontal"

    android:layout_below="@+id/textView6"
    android:layout_centerHorizontal="true" />

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:text="Treffpunkt Süd"
    android:id="@+id/textView9"
    android:layout_below="@+id/textView5"
    android:layout_centerHorizontal="true" />

<LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_marginLeft="25dp"
    android:layout_marginRight="25dp"
    android:layout_marginTop="30dp"
    android:layout_above="@+id/imageView"
    android:layout_below="@+id/textView7">

    <ListView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/listView2"
        android:layout_centerHorizontal="true"

        android:dividerHeight="9dp"
        android:divider="@android:color/transparent" />
</LinearLayout>

<ImageView
    android:layout_width="match_parent"
    android:layout_height="120dp"
    android:id="@+id/imageView"
    android:src="@drawable/soest_skyline1"
    android:scaleType="fitXY"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"/></RelativeLayout>

It happens only when modifying the XML files on the project. If you rebuild the entire project before running (Build > Rebuild Project) it doesn't show up anymore.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM