I am getting the following exceptions
java.lang.RuntimeException: Unable to start activity ComponentInfo{mypackage/mypackage.MyActivity}: android.view.InflateException: Binary XML file line #238: Error inflating class <unknown>
MyActivity setContentView
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.myxmlfile); // >>>>>>>> This is line 238
myxmlfile.xml
<ImageView
android:id="@+id/myanimation"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_centerInParent="true"
android:background="@drawable/myanimationfile"
android:visibility="visible" />
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/myanimationfile.xml from drawable resource ID #0x7f020027
This file does exist in the path res/drawable/
Following this I get
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/animation00013.png from drawable resource ID #0x7f02000a
Again, animation00013.png does exist in the path
I have extracted the apk using unzip and checked for these files. They exist.
Have you tried cleaning the project? Sometimes the adt pluggin doesn’t update the resources in R with new ids to appropriately account for file changes. I have run into the issue before.