所以我正在构建我的第一个 android 应用程序。试图让我的启动画面工作。但 Splash.java 显示错误“StartingPoint 无法解析为类型。
这是我的清单
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.arjun.add"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Splash"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".StartingPoint"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.arjun.add.StartingPoint" />
<category android:name="android.intent.category.DEDAULT" />
</intent-filter>
</activity>
</application>
</manifest>
这是我的 Splash.Java
package com.arjun.add;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class Splash extends Activity {
@Override
protected void onCreate(Bundle ArjunSharma) {
// TODO Auto-generated method stub
super.onCreate(ArjunSharma);
setContentView(R.layout.splash);
Thread timer = new Thread (){
public void run(){
try{
sleep(5000);
} catch (InterruptedException e){
e.printStackTrace();
}finally{
Intent openStartingPoint = new Intent(Splash.this, StartingPoint.class );
startActivity(openStartingPoint);
}
}
};
timer.start();
}
}
希望你们能帮助我