这是我的第一篇文章...请原谅我。
所以它只是在“介绍”页面上强制关闭,但它可以在我的个人手机和三星Note 3虚拟设备上非常流畅地运行。
有错误代码 - 三星S5手机:
错误日志显示在“由...引起:android.view.InflateException:二进制XML文件行#6:” &安培; Java.lang.RuntimeException:无法启动活动ComponentInfo {com.cuzor.master.master / com.cuzor.master.master.intro}:
Java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cuzor.master.master/com.cuzor.master.master.intro}: android.view.InflateException: Binary XML file line #6: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:669)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:694)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
at android.app.Activity.setContentView(Activity.java:1929)
at com.cuzor.master.master.intro.onCreate(intro.java:13)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
我的Java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.intro);
Thread logoTimer = new Thread() {
public void run() {
try {
sleep(3000);
Intent menuIntent = new Intent("com.cuzor.master.select");
startActivity(menuIntent);
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
finish();
}
}
};
logoTimer.start();
} }
清单文件
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<activity
android:name=".MAIN"
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=".intro"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.intro" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".select"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.select" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".zero"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.zero" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".ten"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.ten" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".twenty"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.twenty" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".thirty"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.thirty" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".forty"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.forty" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".fifty"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.fifty" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".sixty"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.sixty" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".seventy"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.seventy" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".eighty"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.eighty" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".ninety"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.ninety" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".hundred"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.cuzor.master.hundred" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>