[英]reference to findViewById is ambiguous
我幾天前告訴您,我無法調試應用程序,然后我重新安裝了android studio並更新了最新版本,現在我想在使用"findViewById (R.id.nombre )"
,則會出現以下錯誤:
Error: (23, 31) error: reference to findViewById is ambiguous
both method findViewById (int) in Activity and method <T> findViewById (int) in AppCompatActivity match
where T is a type-variable:
T extends View declared in method <T> findViewById (int)
我已經在這里搜索過,但是我的問題仍然是我希望您能為我提供幫助,並附上一些照片
您正在使用findViewById (R.id.nombre )
。 其中在兩個活動(Activity和AppCompatActivity)中使用相同的名稱定義了nombre。 您應在每個活動中為nombre指定不同的名稱。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.