9

I have switched to Android Studio 3. After many problems that I fixed, I got these errors:

enter image description here

enter image description here

Why, in my layout do I get this error?

When I have commented out "@style/TextAppearance.StatusBar.EventContent", it gets uncommented out again after rebuild.

Above this layout page there is a note:

Files under build folder are generated and should not be edited

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="100dp"
android:orientation="vertical">

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="right"
    android:paddingRight="15dp"
    android:text="سامانه پایش همراه"
    android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
    android:textSize="18sp"
    android:textStyle="bold" />

This is the complete layout,
and you can see whole Gradle config from this link.
This is my Gradle project.

Keale
  • 3,924
  • 3
  • 29
  • 46
Groot
  • 177
  • 1
  • 2
  • 10

1 Answers1

3

I don't see TextAppearance.StatusBar.Even‌​‌​tContent defined In your style : change it into defined style or remove it if it is unacessary

Nawrez
  • 3,314
  • 8
  • 28
  • 42
  • I delete this line but after rebuild project this line again is added. – Groot Nov 02 '17 at 08:58
  • see https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html : paragraph : Incorrect use of @ resource reference symbols – Nawrez Nov 02 '17 at 09:00
  • I think I do important think. – Groot Nov 02 '17 at 09:05
  • https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#at_symbol – Nawrez Nov 02 '17 at 09:07
  • I have changed color like this:`color/colorPrimary` but i go this error:`Error:(87, 5) error: expected color but got (raw string) color/gray.` – Groot Nov 02 '17 at 09:11
  • can you add color.xml file ? – Nawrez Nov 02 '17 at 09:21
  • Additionally, consider if you incorrectly include the symbol when accessing a resource from the android namespace, as shown below: ... When building the module, AAPT2 now throws the following build error: Error: style attribute '@android:attr/windowEnterAnimation' not found – Nawrez Nov 02 '17 at 10:56
  • Unfortunately i do not have to access to my pc.i will test it tomorrow .why down vote???? – Groot Nov 03 '17 at 18:37
  • But my main questions was ’android:textAppearance=`@style/TextAppearance.StatusBar.EventContent` – Groot Nov 03 '17 at 18:41
  • I do not know, why I can not change any line of my layout? https://ibb.co/bHuaTG . I got `Design editor is unavailable until a successful build` – Groot Nov 04 '17 at 04:51
  • It's not me who downvoted :/ , did you implement the last changes ? – Nawrez Nov 04 '17 at 05:57
  • If your mean is Last change of android studio, yes i do last change. but if your mean is last change of your suggestion, I did not a problem with color, my problem is `’android:textAppearance=@style/TextAppearance.StatusBar.Even‌​tContent` – Groot Nov 04 '17 at 06:02
  • I don't see TextAppearance.StatusBar.Even‌​‌​tContent defined In your style : change it into defined style – Nawrez Nov 05 '17 at 20:45
  • 2
    I finally fix it. I have just removed `android:textAppearance=@style/TextAppearance.StatusBar.Even‌​‌​tContent` in main code and whithout this code, everything is good. – Groot Nov 06 '17 at 04:15
  • 1
    congrats friend ! – Nawrez Nov 06 '17 at 06:16