2013-01-04 65 views
-3

我写了简单的代码,但我不知道为什么我的模拟器总是告诉我这个error:"the application has stopped unexpectedly android please try again"。我试图摆脱它,但没有成功帮助我请谢谢。 http://www.imageurlhost.com/images/msvwuxotq5fcpg63q8br_Logcat.pngAndroid应用程序的力量终止

package com.tusway.BasicTutorial; 
    import android.app.Activity; 
    import android.os.Bundle; 
    public class myMenu extends Activity { 

    @Override 
    protected void onCreate(Bundle savedInstanceState) { 
    // TODO Auto-generated method stub 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.main); 
    } 
    } 

我的XML

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="com.tusway.BasicTutorial" 
android:versionCode="1" 
android:versionName="1.0"> 
<uses-sdk android:minSdkVersion="8" /> 

<application android:icon="@drawable/icon" android:label="@string/app_name"> 
<activity android:name=".MyMain" 
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=".myMenu" 
       android:label="@string/app_name"> 
     <intent-filter> 
      <action android:name="com.tusway.BasicTutorial.CLEARSCREEN" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
</application> 
</manifest> 
+3

它 –

+0

你可以把什么厚望你得到的Logcat.??required日志..... !!!!发布的logcat共享错误 – raju

+0

请发布LOGCAT – Shoshi

回答

-2

请更改包名 “com.tusway.BasicTutorial”

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="com.tusway.BasicTutorial" 
android:versionCode="1" 
android:versionName="1.0"> 

请更改为 “com.tusway.basictutorial”

+0

它是一个很好的做法,以非大写字母的形式声明包名,但它不可能对异常负责。 –

+0

我已经测试过,然后提供我的消化... –

-1

我有n OT尝试过,但请编辑过的一个替换您的清单文件

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="com.tusway.BasicTutorial" 
android:versionCode="1" 
android:versionName="1.0"> 
<uses-sdk android:minSdkVersion="8" /> 
<application android:icon="@drawable/icon" android:label="@string/app_name"> 
<activity android:name=".MyMain" 
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="com.tusway.BasicTutorial.CLEARSCREEN" 
      /> 

</application> 
</manifest>