何千人もの人々が「スプラッシュを使用しないでください」と言っているのは理解できますが、アプリはそれほど大きくありません。何が間違っているのか知りたいだけです。マニフェストに問題があると思いますが、スプラッシュが表示され、メイン ページに移動するはずのときに、「申し訳ありません。アプリケーション Grifball (プロセス com.grefball.info) が予期せず停止しました。もう一度やり直してください。
これが私のマニフェストです。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.grifball.info"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity android:name="Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.grifball.info.MAINACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
これが私のSplashのJavaです
package com.grifball.info;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class Splash extends Activity{
@Override
protected void onCreate(Bundle startup) {
// TODO Auto-generated method stub
super.onCreate(startup);
setContentView(R.layout.splash);
Thread timer = new Thread(){
public void run(){
try{
sleep(5000);
}catch(InterruptedException e){
e.printStackTrace();
}finally{
Intent openMainActivity = new Intent("com.grifball.info.MAINACTIVITY");
startActivity(openMainActivity);
}
}
};
timer.start();
}
}
ここにXMLがあります
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/splashbg">
</LinearLayout>
これが私の丸太猫です
04-03 02:39:20.527: D/AndroidRuntime(318): Shutting down VM
04-03 02:39:20.527: W/dalvikvm(318): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
04-03 02:39:20.537: E/AndroidRuntime(318): FATAL EXCEPTION: main
04-03 02:39:20.537: E/AndroidRuntime(318): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.grifball.info/com.grifball.info.MainActivity}: java.lang.RuntimeException: native typeface cannot be made
04-03 02:39:20.537: E/AndroidRuntime(318): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
04-03 02:39:20.537: E/AndroidRuntime(318): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-03 02:39:20.537: E/AndroidRuntime(318): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-03 02:39:20.537: E/AndroidRuntime(318): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-03 02:39:20.537: E/AndroidRuntime(318): at android.os.Handler.dispatchMessage(Handler.java:99)
04-03 02:39:20.537: E/AndroidRuntime(318): at android.os.Looper.loop(Looper.java:123)
04-03 02:39:20.537: E/AndroidRuntime(318): at android.app.ActivityThread.main(ActivityThread.java:4627)
04-03 02:39:20.537: E/AndroidRuntime(318): at java.lang.reflect.Method.invokeNative(Native Method)
04-03 02:39:20.537: E/AndroidRuntime(318): at java.lang.reflect.Method.invoke(Method.java:521)
04-03 02:39:20.537: E/AndroidRuntime(318): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-03 02:39:20.537: E/AndroidRuntime(318): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-03 02:39:20.537: E/AndroidRuntime(318): at dalvik.system.NativeStart.main(Native Method)
04-03 02:39:20.537: E/AndroidRuntime(318): Caused by: java.lang.RuntimeException: native typeface cannot be made
04-03 02:39:20.537: E/AndroidRuntime(318): at android.graphics.Typeface.<init>(Typeface.java:147)
04-03 02:39:20.537: E/AndroidRuntime(318): at android.graphics.Typeface.createFromAsset(Typeface.java:121)
04-03 02:39:20.537: E/AndroidRuntime(318): at com.grifball.info.MainActivity.onCreate(MainActivity.java:27)
04-03 02:39:20.537: E/AndroidRuntime(318): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-03 02:39:20.537: E/AndroidRuntime(318): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
04-03 02:39:20.537: E/AndroidRuntime(318): ... 11 more