You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android应用添加启动页时遇资源标识符错误求助

Fixing "No resource identifier found for attribute 'lable' in package 'android'" Error

Hey there! Let's get this splash screen error sorted out quickly.

What's Causing the Error?

The core issue here is a typo: you've written lable instead of the correct attribute name label (notice the missing 'e' at the end). Even though the error points to Splashscreen.java, the problem isn't in your Java code at all—your provided code looks totally fine! The mistake is almost certainly in one of your XML files.

Step-by-Step Fix

  • First, open your AndroidManifest.xml file. Look for the <activity> tag that declares your Splashscreen class. Check if you have an attribute like android:lable="@string/app_name" (or any other value) — change that to android:label.
  • If the manifest looks correct, open your activity_splashscreen.xml layout file. Scan all attributes using the android: namespace (like android:id, android:layout_width) and make sure none of them are misspelled as lable. Replace any instances with label.
  • Finally, clean and rebuild your project to clear any cached errors:
    1. Go to Build > Clean Project in Android Studio
    2. Then run Build > Rebuild Project

Once you fix that typo, the error should disappear, and your splash screen should work as expected!

内容的提问来源于stack exchange,提问作者subhasish bose

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:03:55