Eclipse 中的 Android 项目,不幸的是“appName”已停止

Posted

技术标签:

【中文标题】Eclipse 中的 Android 项目,不幸的是“appName”已停止【英文标题】:Android Project in Eclipse, Unfortunately 'appName' Has Stopped 【发布时间】:2015-06-10 02:48:53 【问题描述】:

我是 android 编程新手,我在 Eclipse 中创建了一个简单的项目。当我尝试运行它时,我收到以下消息:不幸的是应用程序已停止。

这是布局:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_
  android:layout_
  android:gravity="center"
  android:orientation="vertical" >

  <TextView

    android:layout_
    android:layout_
    android:padding="24dp" 
    android:text="@string/question_text"/>

  <LinearLayout
    android:layout_
    android:layout_
    android:orientation="horizontal">

    <Button
      android:id="@+id/true_button"      
      android:layout_
      android:layout_
      android:text="@string/true_button" />

    <Button
      android:id="@+id/false_button"
      android:layout_
      android:layout_
      android:text="@string/false_button" />

  </LinearLayout>

</LinearLayout>

这是我的活动课程:

package com.bignerdranch.android.geoquiz;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;


public class Quizctivity extends ActionBarActivity 

    private Button mTrueButton;
    private Button mFalseButton;


    @Override
    protected void onCreate(Bundle savedInstanceState) 
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_quizctivity);

        mTrueButton = (Button)findViewById(R.id.true_button);
        mTrueButton.setOnClickListener(new View.OnClickListener() 

            @Override
            public void onClick(View v) 
                Toast.makeText(Quizctivity.this,R.string.incorrect_toast , Toast.LENGTH_SHORT).show();

            
        );

        mFalseButton = (Button)findViewById(R.id.false_button);
        mFalseButton.setOnClickListener(new View.OnClickListener() 

            @Override
            public void onClick(View arg0) 
                Toast.makeText(Quizctivity.this, R.string.correct_toast,Toast.LENGTH_SHORT).show();

            
        );
    


    @Override
    public boolean onCreateOptionsMenu(Menu menu) 
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.quizctivity, menu);
        return true;
    

    @Override
    public boolean onOptionsItemSelected(MenuItem item) 
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == R.id.action_settings) 
            return true;
        
        return super.onOptionsItemSelected(item);
    

这是控制台

[2015-04-05 19:15:22 - GeoQuiz] ------------------------------
[2015-04-05 19:15:22 - GeoQuiz] Android Launch!
[2015-04-05 19:15:22 - GeoQuiz] adb is running normally.
[2015-04-05 19:15:22 - GeoQuiz] Performing com.bignerdranch.android.geoquiz.Quizctivity activity launch
[2015-04-05 19:15:22 - GeoQuiz] Automatic Target Mode: launching new emulator with compatible AVD 'Nexus_API_17'
[2015-04-05 19:15:22 - GeoQuiz] Launching a new emulator with Virtual Device 'Nexus_API_17'
[2015-04-05 19:16:02 - GeoQuiz] New emulator found: emulator-5554
[2015-04-05 19:16:02 - GeoQuiz] Waiting for HOME ('android.process.acore') to be launched...
[2015-04-05 19:17:34 - GeoQuiz] emulator-5554 disconnected! Cancelling 'com.bignerdranch.android.geoquiz.Quizctivity activity launch'!
[2015-04-05 19:18:57 - SDK Manager] Snapshot image already present, was not changed.
[2015-04-05 19:18:58 - SDK Manager] Updated AVD 'Nexus_API_17' based on Android 4.4W, Android Wear ARM (armeabi-v7a) processor,
[2015-04-05 19:18:58 - SDK Manager] with the following hardware config:
[2015-04-05 19:18:58 - SDK Manager] disk.dataPartition.size=200M
[2015-04-05 19:18:58 - SDK Manager] hw.accelerometer=yes
[2015-04-05 19:18:58 - SDK Manager] hw.audioInput=yes
[2015-04-05 19:18:58 - SDK Manager] hw.battery=yes
[2015-04-05 19:18:58 - SDK Manager] hw.camera.back=none
[2015-04-05 19:18:58 - SDK Manager] hw.camera.front=none
[2015-04-05 19:18:58 - SDK Manager] hw.dPad=no
[2015-04-05 19:18:58 - SDK Manager] hw.device.hash2=MD5:6930e145748b87e87d3f40cabd140a41
[2015-04-05 19:18:58 - SDK Manager] hw.device.manufacturer=Google
[2015-04-05 19:18:58 - SDK Manager] hw.device.name=Galaxy Nexus
[2015-04-05 19:18:58 - SDK Manager] hw.gps=yes
[2015-04-05 19:18:58 - SDK Manager] hw.keyboard=yes
[2015-04-05 19:18:58 - SDK Manager] hw.lcd.density=320
[2015-04-05 19:18:58 - SDK Manager] hw.mainKeys=no
[2015-04-05 19:18:58 - SDK Manager] hw.ramSize=512
[2015-04-05 19:18:58 - SDK Manager] hw.sdCard=no
[2015-04-05 19:18:58 - SDK Manager] hw.sensors.orientation=yes
[2015-04-05 19:18:58 - SDK Manager] hw.sensors.proximity=yes
[2015-04-05 19:18:58 - SDK Manager] hw.trackBall=no
[2015-04-05 19:18:58 - SDK Manager] skin.dynamic=no
[2015-04-05 19:18:58 - SDK Manager] vm.heapSize=64
[2015-04-05 19:44:59 - GeoQuiz] ------------------------------
[2015-04-05 19:44:59 - GeoQuiz] Android Launch!
[2015-04-05 19:44:59 - GeoQuiz] adb is running normally.
[2015-04-05 19:44:59 - GeoQuiz] Performing com.bignerdranch.android.geoquiz.Quizctivity activity launch
[2015-04-05 19:44:59 - GeoQuiz] Automatic Target Mode: launching new emulator with compatible AVD 'Nexus_API_17'
[2015-04-05 19:44:59 - GeoQuiz] Launching a new emulator with Virtual Device 'Nexus_API_17'
[2015-04-05 19:45:46 - GeoQuiz] New emulator found: emulator-5554
[2015-04-05 19:45:46 - GeoQuiz] Waiting for HOME ('android.process.acore') to be launched...
[2015-04-05 19:47:33 - Emulator] NAND: nand_dev_load_disk_state ftruncate failed: Invalid argument
[2015-04-05 19:47:33 - Emulator] savevm: unable to load section nand_dev
[2015-04-05 19:49:38 - GeoQuiz] emulator-5554 disconnected! Cancelling 'com.bignerdranch.android.geoquiz.Quizctivity activity launch'!

这是清单:

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

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="21" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".Quizctivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

已编辑:这是logcat的尾巴:

04-05 17:21:36.650: I/Choreographer(454): Skipped 139 frames!  The application may be doing too much work on its main thread.
04-05 17:21:36.950: D/FakeRecognitionService(454): cancel()
04-05 17:21:36.970: I/Choreographer(454): Skipped 31 frames!  The application may be doing too much work on its main thread.
04-05 17:21:37.160: I/Choreographer(454): Skipped 231 frames!  The application may be doing too much work on its main thread.
04-05 17:21:37.270: I/Choreographer(454): Skipped 115 frames!  The application may be doing too much work on its main thread.
04-05 17:21:37.390: I/Choreographer(454): Skipped 122 frames!  The application may be doing too much work on its main thread.
04-05 17:21:37.500: I/Choreographer(454): Skipped 129 frames!  The application may be doing too much work on its main thread.
04-05 17:21:37.610: I/Choreographer(454): Skipped 127 frames!  The application may be doing too much work on its main thread.
04-05 17:21:38.990: I/Choreographer(454): Skipped 170 frames!  The application may be doing too much work on its main thread.
04-05 17:21:39.210: I/Choreographer(454): Skipped 253 frames!  The application may be doing too much work on its main thread.
04-05 17:21:39.320: I/Choreographer(454): Skipped 129 frames!  The application may be doing too much work on its main thread.
04-05 17:21:39.470: I/Choreographer(454): Skipped 113 frames!  The application may be doing too much work on its main thread.
04-05 17:21:39.580: I/Choreographer(454): Skipped 137 frames!  The application may be doing too much work on its main thread.
04-05 17:21:39.740: I/Choreographer(454): Skipped 195 frames!  The application may be doing too much work on its main thread.
04-05 17:21:39.870: I/Choreographer(454): Skipped 150 frames!  The application may be doing too much work on its main thread.
04-05 17:21:40.250: I/Choreographer(454): Skipped 228 frames!  The application may be doing too much work on its main thread.
04-05 17:21:40.370: I/Choreographer(454): Skipped 144 frames!  The application may be doing too much work on its main thread.
04-05 17:21:40.520: I/Choreographer(454): Skipped 173 frames!  The application may be doing too much work on its main thread.
04-05 17:21:40.660: I/Choreographer(454): Skipped 166 frames!  The application may be doing too much work on its main thread.
04-05 17:21:41.530: I/Choreographer(454): Skipped 235 frames!  The application may be doing too much work on its main thread.
04-05 17:21:41.700: I/Choreographer(454): Skipped 200 frames!  The application may be doing too much work on its main thread.
04-05 17:21:41.800: I/Choreographer(454): Skipped 114 frames!  The application may be doing too much work on its main thread.
04-05 17:21:41.930: I/Choreographer(454): Skipped 133 frames!  The application may be doing too much work on its main thread.
04-05 17:21:42.060: I/Choreographer(454): Skipped 149 frames!  The application may be doing too much work on its main thread.
04-05 17:21:42.160: I/Choreographer(454): Skipped 119 frames!  The application may be doing too much work on its main thread.
04-05 17:21:42.290: I/Choreographer(454): Skipped 147 frames!  The application may be doing too much work on its main thread.
04-05 17:21:43.350: I/Choreographer(454): Skipped 136 frames!  The application may be doing too much work on its main thread.
04-05 17:21:43.510: D/dalvikvm(454): GC_FOR_ALLOC freed 569K, 13% free 5137K/5880K, paused 38ms, total 48ms
04-05 17:21:43.690: E/HostWithRpcCallback(454): Failed to send RPC
04-05 17:21:43.690: E/HostWithRpcCallback(454): com.google.android.wearable.gmsclient.WearableException: sendRpcAsync failed: StatusstatusCode=unknown status code: 4000, resolution=null
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.GoogleApiClientHelper.throwIfFailed(GoogleApiClientHelper.java:98)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.MessageManager$1$1.getResult(MessageManager.java:81)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.MessageManager$1$1.getResult(MessageManager.java:78)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at com.google.android.clockwork.actions.WearableHostWithRpcCallback$SendRpcCallbackWithId.onSendRpc(WearableHostWithRpcCallback.java:292)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.MessageManager$1.onResult(MessageManager.java:78)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.MessageManager$1.onResult(MessageManager.java:75)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at com.google.android.gms.common.api.BaseImplementation$CallbackHandler.deliverResultCallback(Unknown Source)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at com.google.android.gms.common.api.BaseImplementation$CallbackHandler.handleMessage(Unknown Source)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at android.os.Handler.dispatchMessage(Handler.java:102)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at android.os.Looper.loop(Looper.java:136)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at android.app.ActivityThread.main(ActivityThread.java:5026)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at java.lang.reflect.Method.invokeNative(Native Method)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at java.lang.reflect.Method.invoke(Method.java:515)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
04-05 17:21:43.690: E/HostWithRpcCallback(454):     at dalvik.system.NativeStart.main(Native Method)
04-05 17:21:45.580: I/Choreographer(454): Skipped 152 frames!  The application may be doing too much work on its main thread.
04-05 17:21:45.800: I/Choreographer(454): Skipped 261 frames!  The application may be doing too much work on its main thread.
04-05 17:21:45.910: I/Choreographer(454): Skipped 110 frames!  The application may be doing too much work on its main thread.
04-05 17:21:46.050: I/Choreographer(454): Skipped 170 frames!  The application may be doing too much work on its main thread.
04-05 17:21:46.160: I/Choreographer(454): Skipped 130 frames!  The application may be doing too much work on its main thread.
04-05 17:21:47.350: I/ActivityManager(355): START u0 act=android.intent.action.MAIN flg=0x10000000 cmp=com.bignerdranch.android.geoquiz/.Quizctivity from pid 454 on display 0
04-05 17:21:47.450: D/PermissionCache(50): checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (3035 us)
04-05 17:21:47.460: E/SurfaceFlinger(50): size mismatch (328, 328) > (280, 280)
04-05 17:21:47.470: W/WindowManager(355): Screenshot failure taking screenshot for (328x328) to layer 21000
04-05 17:21:47.550: I/ActivityManager(355): Start proc com.bignerdranch.android.geoquiz for activity com.bignerdranch.android.geoquiz/.Quizctivity: pid=716 uid=10019 gids=50019
04-05 17:21:47.580: D/dalvikvm(716): Not late-enabling CheckJNI (already on)
04-05 17:21:47.620: E/HostWithRpcCallback(454): Failed to send RPC
04-05 17:21:47.620: E/HostWithRpcCallback(454): com.google.android.wearable.gmsclient.WearableException: sendRpcAsync failed: StatusstatusCode=unknown status code: 4000, resolution=null
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.GoogleApiClientHelper.throwIfFailed(GoogleApiClientHelper.java:98)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.MessageManager$1$1.getResult(MessageManager.java:81)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.MessageManager$1$1.getResult(MessageManager.java:78)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at com.google.android.clockwork.actions.WearableHostWithRpcCallback$SendRpcCallbackWithId.onSendRpc(WearableHostWithRpcCallback.java:292)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.MessageManager$1.onResult(MessageManager.java:78)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.MessageManager$1.onResult(MessageManager.java:75)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at com.google.android.gms.common.api.BaseImplementation$CallbackHandler.deliverResultCallback(Unknown Source)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at com.google.android.gms.common.api.BaseImplementation$CallbackHandler.handleMessage(Unknown Source)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at android.os.Handler.dispatchMessage(Handler.java:102)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at android.os.Looper.loop(Looper.java:136)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at android.app.ActivityThread.main(ActivityThread.java:5026)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at java.lang.reflect.Method.invokeNative(Native Method)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at java.lang.reflect.Method.invoke(Method.java:515)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
04-05 17:21:47.620: E/HostWithRpcCallback(454):     at dalvik.system.NativeStart.main(Native Method)
04-05 17:21:48.080: D/AndroidRuntime(716): Shutting down VM
04-05 17:21:48.080: W/dalvikvm(716): threadid=1: thread exiting with uncaught exception (group=0xb1a38d70)
04-05 17:21:48.100: E/AndroidRuntime(716): FATAL EXCEPTION: main
04-05 17:21:48.100: E/AndroidRuntime(716): Process: com.bignerdranch.android.geoquiz, PID: 716
04-05 17:21:48.100: E/AndroidRuntime(716): java.lang.RuntimeException: Unable to start activity ComponentInfocom.bignerdranch.android.geoquiz/com.bignerdranch.android.geoquiz.Quizctivity: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.app.ActivityThread.access$800(ActivityThread.java:138)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.os.Handler.dispatchMessage(Handler.java:102)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.os.Looper.loop(Looper.java:136)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.app.ActivityThread.main(ActivityThread.java:5026)
04-05 17:21:48.100: E/AndroidRuntime(716):  at java.lang.reflect.Method.invokeNative(Native Method)
04-05 17:21:48.100: E/AndroidRuntime(716):  at java.lang.reflect.Method.invoke(Method.java:515)
04-05 17:21:48.100: E/AndroidRuntime(716):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
04-05 17:21:48.100: E/AndroidRuntime(716):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
04-05 17:21:48.100: E/AndroidRuntime(716):  at dalvik.system.NativeStart.main(Native Method)
04-05 17:21:48.100: E/AndroidRuntime(716): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
04-05 17:21:48.100: E/AndroidRuntime(716):  at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:277)
04-05 17:21:48.100: E/AndroidRuntime(716):  at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2889)
04-05 17:21:48.100: E/AndroidRuntime(716):  at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3154)
04-05 17:21:48.100: E/AndroidRuntime(716):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:305)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.app.Activity.setContentView(Activity.java:1930)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
04-05 17:21:48.100: E/AndroidRuntime(716):  at com.bignerdranch.android.geoquiz.Quizctivity.onCreate(Quizctivity.java:21)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.app.Activity.performCreate(Activity.java:5242)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
04-05 17:21:48.100: E/AndroidRuntime(716):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
04-05 17:21:48.100: E/AndroidRuntime(716):  ... 11 more
04-05 17:21:48.140: W/ActivityManager(355):   Force finishing activity com.bignerdranch.android.geoquiz/.Quizctivity
04-05 17:21:48.160: W/InputMethodManagerService(355): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@b1e38470 attribute=null, token = android.os.BinderProxy@b1da5078
04-05 17:21:48.400: D/dalvikvm(355): GC_FOR_ALLOC freed 294K, 15% free 4495K/5264K, paused 60ms, total 66ms
04-05 17:21:48.410: I/dalvikvm-heap(355): Grow heap (frag case) to 5.598MB for 1127536-byte allocation
04-05 17:21:48.480: D/dalvikvm(355): GC_FOR_ALLOC freed 21K, 13% free 5575K/6368K, paused 65ms, total 65ms
04-05 17:21:48.780: W/ActivityManager(355): Activity pause timeout for ActivityRecordb1d9c5f0 u0 com.bignerdranch.android.geoquiz/.Quizctivity t2 f
04-05 17:21:48.850: I/Choreographer(355): Skipped 166 frames!  The application may be doing too much work on its main thread.
04-05 17:21:48.900: E/HostWithRpcCallback(454): Failed to send RPC
04-05 17:21:48.900: E/HostWithRpcCallback(454): com.google.android.wearable.gmsclient.WearableException: sendRpcAsync failed: StatusstatusCode=unknown status code: 4000, resolution=null
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.GoogleApiClientHelper.throwIfFailed(GoogleApiClientHelper.java:98)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.MessageManager$1$1.getResult(MessageManager.java:81)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.MessageManager$1$1.getResult(MessageManager.java:78)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at com.google.android.clockwork.actions.WearableHostWithRpcCallback$SendRpcCallbackWithId.onSendRpc(WearableHostWithRpcCallback.java:292)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.MessageManager$1.onResult(MessageManager.java:78)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at com.google.android.wearable.gmsclient.MessageManager$1.onResult(MessageManager.java:75)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at com.google.android.gms.common.api.BaseImplementation$CallbackHandler.deliverResultCallback(Unknown Source)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at com.google.android.gms.common.api.BaseImplementation$CallbackHandler.handleMessage(Unknown Source)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at android.os.Handler.dispatchMessage(Handler.java:102)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at android.os.Looper.loop(Looper.java:136)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at android.app.ActivityThread.main(ActivityThread.java:5026)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at java.lang.reflect.Method.invokeNative(Native Method)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at java.lang.reflect.Method.invoke(Method.java:515)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
04-05 17:21:48.900: E/HostWithRpcCallback(454):     at dalvik.system.NativeStart.main(Native Method)
04-05 17:21:48.910: I/Choreographer(454): Skipped 30 frames!  The application may be doing too much work on its main thread.
04-05 17:21:49.150: I/Choreographer(355): Skipped 364 frames!  The application may be doing too much work on its main thread.
04-05 17:21:49.320: I/ARMAssembler(50): generated scanline__00000077:03515104_00009002_00000000 [127 ipp] (149 ins) at [0xb5f1c1f0:0xb5f1c444] in 10000000 ns
04-05 17:21:49.350: I/Choreographer(355): Skipped 72 frames!  The application may be doing too much work on its main thread.
04-05 17:21:49.420: I/Choreographer(355): Skipped 63 frames!  The application may be doing too much work on its main thread.
04-05 17:21:49.470: I/Choreographer(355): Skipped 44 frames!  The application may be doing too much work on its main thread.
04-05 17:21:49.480: I/ARMAssembler(50): generated scanline__00000077:03010104_00008002_00000000 [ 89 ipp] (110 ins) at [0xb5f1c450:0xb5f1c608] in 0 ns
04-05 17:21:49.540: I/Choreographer(355): Skipped 38 frames!  The application may be doing too much work on its main thread.
04-05 17:21:49.580: I/Choreographer(355): Skipped 44 frames!  The application may be doing too much work on its main thread.
: E/(): Device disconnected

你可以在这里找到整个 logcat 文件:

http://s000.tinyupload.com/?file_id=08112918451584823866

我真的需要修复这个错误,如果有任何答案,我将不胜感激。提前非常感谢。

【问题讨论】:

这不是正确的 logcat 信息。请张贴正确的。 非常感谢您的回复。我编辑了我的问题并添加了 logcat。 Quizctivity 中的第 21 行是什么? 我认为您在 Android 4.4W 上运行该应用程序,这是 Wear 版本。尝试在另一个版本中运行。更多信息在这里***.com/questions/24587218/… 感谢您的回复。如果您的意思是我在上述问题中包含的活动类,那么该类中只有 64 行代码 【参考方案1】:

非常感谢您的 cmets。我将 android 版本更改为 4.2.2,一切顺利。

【讨论】:

以上是关于Eclipse 中的 Android 项目,不幸的是“appName”已停止的主要内容,如果未能解决你的问题,请参考以下文章

Eclipse - 不幸的是应用程序已停止 - ClassNotFoundException:在路径上找不到类

选择 Android 库的构建变体的 Gradle 脚本

android eclipse如何使用intent在默认导航抽屉中显示第二个窗口

为啥图形布局(适用于 android)不出现在 Eclipse 中?

Eclipse 中的导入处理(Android 项目)

Eclipse/Android 中的可重用项目