나는 GridLayout과에 추가하기 위해 R.id.itemView 팽창하고 있습니다 :
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f040015 type #0x12 is not valid
그러나
View item = getLayoutInflater().inflate(R.id.itemView,null);
, 나는 그것을 팽창이 오류를 얻고있다
해당 리소스 번호는 itemView에 해당합니다 (R.java에서 확인). 여기 (고해상도/레이아웃 color_view.xml)를 itemView가있는 파일입니다
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res/com.example.colors"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal">
<View
android:id="@+id/itemView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="5dp"
android:background="@drawable/color_shape" />
</RelativeLayout>
내가 구축하고 R.java 삭제, 청소 시도했지만이 문제를 해결 나던. 이 문제의 원인은 무엇입니까?