Android RuntimeException Resources$NotFoundException

Refresh

November 2018

Views

75 time

2

I am making an app in Android but when launch the second activity in my app, it gives Resources$NotFoundException at the setContentView(int) method. I have made sure that I have typed the correct resource layout id and the resource id shown in the error is also present in the R.java file with the correct resource. I have also tried cleaning the project and also restarting eclipse multiple times. The error still stays. Please help.

My Activity File

Activity File

Layout File

Layout File

The Error in LogCat

Logcat Error

R.java

R.java

1 answers

2

Попробуйте поставить activity_single_player_add_bet макета XML в другой папке ( макет вместо макета-земля ).

Подробнее здесь: Предоставление альтернативных ресурсов и Как Поддержка нескольких экранов

Обновить:

Для получения макета в альбомной ориентации , вы должны изменить AndroidManifest.xml :

android:screenOrientation="landscape"  

Подробности: