2013-06-05 68 views
0

我完全陌生于android。我对代码的知识非常有限。当我尝试在Android设备上运行的应用程序将其与“不幸的是(应用程序名称)已停止”的信息,那就请可一些身体告诉我如何解决这个问题不幸的是(应用程序名称)已停止

这是我的清单

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


<application android:icon="@drawable/icon" android:label="@string/app_name"> 
    <activity android:name="com.benchaful.newBoard" 
       android:label="@string/app_name" 
       android:screenOrientation="portrait"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
     <activity android:name="com.google.ads.AdActivity" 
      android:configChanges="keyboard|keyboardHidden|orientation" /> 
</application> 
    <uses-permission android:name="android.permission.INTERNET"/> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 

</manifest> 

我主要布局

<?xml version="1.0" encoding="utf-8"?> 

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:ads="http://schemas.android.com/apk/res/com.benchaful.newboard" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    > 

    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/scrollview1" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    > 

     <LinearLayout android:layout_width="fill_parent" 
     android:id="@+id/home_layout" 
     android:orientation="vertical" 
     android:layout_height="wrap_content" 
     android:background="#000000" 
     > 

有一些按钮这里

<WebView 
    android:id="@+id/accesskey" 
    android:layout_width="fill_parent" 
    android:layout_height="100px" 
/> 


    </LinearLayout> 
</ScrollView> 

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
       xmlns:ads="http://schemas.android.com/apk/res/com.benchaful.newboard" 
       android:orientation="vertical" 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" 
       android:background="#ffffff" 
       android:gravity="bottom" 
       android:layout_alignParentBottom="true" 
       android:layout_alignBottom="@+id/home_layout" 
       > 

这是我的logcat

06-05 16:32:04.423: E/AndroidRuntime(9665): FATAL EXCEPTION: main 
06-05 16:32:04.423: E/AndroidRuntime(9665): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.benchaful.newboard/com.benchaful.newBoard}: java.lang.ClassNotFoundException: com.benchaful.newBoard 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2045) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2146) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at android.app.ActivityThread.access$700(ActivityThread.java:140) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at android.os.Handler.dispatchMessage(Handler.java:99) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at android.os.Looper.loop(Looper.java:137) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at android.app.ActivityThread.main(ActivityThread.java:4944) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at java.lang.reflect.Method.invokeNative(Native Method) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at java.lang.reflect.Method.invoke(Method.java:511) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at dalvik.system.NativeStart.main(Native Method) 
06-05 16:32:04.423: E/AndroidRuntime(9665): Caused by: java.lang.ClassNotFoundException: com.benchaful.newBoard 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at android.app.Instrumentation.newActivity(Instrumentation.java:1068) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2036) 
06-05 16:32:04.423: E/AndroidRuntime(9665):  ... 11 more 

回答

0

它看起来像你对我的定义你的包和课内外

com.benchaful.newboard 

你有,你要开始你的主要的活动,包中的类用?如果你有这门课,那么看到这个帖子也会有帮助。

1

活动的全称是什么?你的清单具有这样的:

<activity android:name="com.benchaful.newBoard" ... >

但 “com.benchaful.newBoard” 是你的包名。

相关问题