Click here to Skip to main content
11,704,044 members (67,724 online)
Rate this: bad
Please Sign up or sign in to vote.
I am currently trying to make a splash screen for a game. Im using android - eclipse. I have viewed probably ten different tutorials on how to do animations and I still get the same affect. My code is error free but when I run it it crashes. The only error that comes up in my logcat is " error opening trace file: No such file or directory(2)" I have no idea what it is talking about and haven't found any answers on google.

Here is my code for my splash screen
package com.dooberz.z_day;
import android.content.Intent;
import android.os.Bundle;
import android.view.MotionEvent;
import android.widget.ImageView;
public class SplashActivity extends Activity 
	//The thread to process splash screen events
	private Thread mSplashThread;
	//Called when the activity is first created.
	public void  onCreate(Bundle savedInstanceState)
		//Splash screen view
		final SplashActivity splashScreen = this;
		final ImageView splashImageView = (ImageView) findViewById(;
		final AnimationDrawable frameAnimation = (AnimationDrawable)splashImageView.getBackground(); Runnable()
			public void run()
		//The thread to wait for splash screen events
		mSplashThread = new Thread()
			public void run()
						//wait give period of time or exit on touch
				catch(InterruptedException e)
				//Run next Activity
				Intent intent = new Intent();
				intent.setClass(splashScreen, MainActivity.class);
	//Processes splash screen touch events
	public boolean onTouchEvent(MotionEvent evt)
		if(evt.getAction() == MotionEvent.ACTION_DOWN)
		return true;

Here is my animation list. I also have the three pictures in my res/drawable folder as well
?xml version="1.0" encoding="utf-8"?>
Posted 5-May-13 9:28am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 530
1 OriginalGriff 510
2 Sergey Alexandrovich Kryukov 421
3 Andy Lanng 294
4 F-ES Sitecore 220
0 OriginalGriff 8,744
1 Sergey Alexandrovich Kryukov 7,747
2 CPallini 5,107
3 Maciej Los 4,716
4 Mika Wendelius 3,606

Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 5 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100