cause
I’m at RES/values/atts.xml
The tabtextsize
attribute is defined in the file. There is no problem when using it, but in the process of compiling, I produced error: Found item attr / tabtextsize more than one time
, which means error: Found item attr / tabtrimescribe defined more than once
, at the beginning, I was puzzled, so I went to see the attributes defined in attr. Find the following as shown:
<resources>
<declare-styleable name="View Name">
<attr name="tabTextSize" format="float"/>
<attr name="tabTextSelectedColor" format="color" />
<attr name="tabTextUnselectedColor" format="color" />
</declare-styleable>
<declare-styleable name="View Name">
<attr name="tabTextSize" format="float"/>
<attr name="tabTextSelectedColor" format="color" />
<attr name="tabTextUnselectedColor" format="color" />
</declare-styleable>
</resources>
Since the custom view property name is the same, the error mentioned above occurred.
How to Fix
The solution is to extract the same attribute and define it. As shown below, <attr name="tabTextSize" format="float" />
is extracted and then called in each view.
<resources>
<attr name="tabTextSize" format="float"/>
<declare-styleable name="View Name">
<attr name="tabTextSize" />
<attr name="tabTextSelectedColor" format="color" />
<attr name="tabTextUnselectedColor" format="color" />
</declare-styleable>
<declare-styleable name="View Name">
<attr name="tabTextSize"/>
<attr name="tabTextSelectedColor" format="color" />
<attr name="tabTextUnselectedColor" format="color" />
</declare-styleable>
</resources>
Read More:
- [Solved] Flutter – AAPT: error: resource android:attr/dialogCornerRadius not found.
- error: resource android:attr/lStar not found [How to Solve]
- error: resource android:attr/lStar not found [How to Solve]
- [Solved] AAPT: error: resource android:attr/lStar not found
- error: resource android:attr/lStar not found [Pefect Solution]
- error: resource android:attr/lStar not found? [How to Solve]
- [Solved] Compile Error: AAPT: error: resource android:attr/lStar not found
- Android7.0+ Failed to Share Images: exposed beyond app through ClipData.Item.getUri()
- The SDK of Android webrtc compiled with Ninja – C out / release command reported an error, and the Android NDK processing method could not be found
- Android Error: Android resource linking failed [How to Solve]
- [Solved] Android Studio Error:SDK location not found.
- [Solved] Android Studio Start Error: Missing essential plugin: org.jetbrains.android Please reinstall Android
- MacOS Mojave uses SMB LAN share as backup disk of timemachine time machine. Disk does not support time machine backups. (error 45)
- [Solved] Android9.0 App Install Android4.4 Error: InflateException-You must supply a layout_height attribute.
- [Solved] Android12 Error: fatal error: ‘mediadrm/ICrypto.h‘ file not found
- [Solved] AgilePLM error: Ora-00904: “A”.”ITEM_NUMBER”: invalid identifier
- Remember an android app startup error Error running: Default Activity not found
- [Solved] Android Kotlin Package release Error: Lint found fatal errors while assembling a release target.
- JZVideo Error: Attempt to invoke virtual method ‘android.view.Window android.app.Activity.getWindow()’ on a null object reference
- flutter, Unable to buy item, Error response code: 7 & flutter_inapp_purchase