从Eclipse构建时,Android App不断崩溃

时间:2014-03-13 19:16:35

标签: java android eclipse bluetooth

我正在使用Eclipse中的一个Android应用程序,对此非常新。我正在尝试使用iBeacon Android SDK构建,每次我构建它都会一直崩溃。这是我的logcat看起来像

03-13 17:42:31.374: W/dalvikvm(9100): threadid=1: thread exiting with uncaught exception (group=0x41768898)
03-13 17:42:31.384: E/AndroidRuntime(9100): FATAL EXCEPTION: main
03-13 17:42:31.384: E/AndroidRuntime(9100): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.estimote.examples.demos/com.estimote.examples.demos.AllDemosActivity}: java.lang.ClassNotFoundException: Didn't find class "com.estimote.examples.demos.AllDemosActivity" on path: /data/app/com.estimote.examples.demos-2.apk
03-13 17:42:31.384: E/AndroidRuntime(9100):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2219)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at android.app.ActivityThread.access$700(ActivityThread.java:159)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at android.os.Looper.loop(Looper.java:137)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at android.app.ActivityThread.main(ActivityThread.java:5419)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at java.lang.reflect.Method.invokeNative(Native Method)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at java.lang.reflect.Method.invoke(Method.java:525)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at dalvik.system.NativeStart.main(Native Method)
03-13 17:42:31.384: E/AndroidRuntime(9100): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.estimote.examples.demos.AllDemosActivity" on path: /data/app/com.estimote.examples.demos-2.apk
03-13 17:42:31.384: E/AndroidRuntime(9100):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
03-13 17:42:31.384: E/AndroidRuntime(9100):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2210)
03-13 17:42:31.384: E/AndroidRuntime(9100):     ... 11 more
03-13 17:42:45.317: I/Process(9100): Sending signal. PID: 9100 SIG: 9

这就是我的清单看起来像

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

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

  <!-- Needed permissions in order to scan for beacons. -->
  <uses-permission android:name="android.permission.BLUETOOTH"/>
  <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

  <!-- Declaration that this app is usable on phones with Bluetooth Low Energy. -->
  <uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>

  <application
      android:label="Estimote Demos"
      android:theme="@android:style/Theme.Holo.Light">

    <activity
        android:name="com.estimote.examples.demos.AllDemosActivity"
        android:label="Estimote Demos"
        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.estimote.examples.demos.ListBeaconsActivity"
        android:label="Select Beacon"
        android:screenOrientation="portrait"/>

    <activity android:name="com.estimote.examples.demos.DistanceBeaconActivity"
              android:label="Distance Demo"
              android:screenOrientation="portrait"/>

    <activity android:name="com.estimote.examples.demos.NotifyDemoActivity"
              android:label="Notify Demo"
              android:screenOrientation="portrait"/>

    <activity android:name="com.estimote.examples.demos.CharacteristicsDemoActivity"
              android:label="Characteristics Demo"
              android:screenOrientation="portrait"/>

    <!-- Estimote service responsible for scanning beacons. -->
    <service android:name="com.estimote.sdk.service.BeaconService"
             android:exported="false"/>
  </application>

</manifest>

我直接从这里下载了SDK

https://github.com/Estimote/Android-SDK

我只想让它在设备上运行。我手机里也没有SIM卡。不确定这是不是问题。

我得到的确切错误是“不幸”APP NAME“已停止”

0 个答案:

没有答案