Android应用不会启动(使用Eclipse) [英] Android app won't launch (using Eclipse)

查看:116
本文介绍了Android应用不会启动(使用Eclipse)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首次使用Android应用程式。它不是启动,因为它是我的第一个应用程序,我不明白的错误。这是控制台输出:

Working on an Android app for the first time. It is not launching and because it's my first app, I don't understand the errors. Here is the console output:

[2014-07-04 09:12:09 - LeapMotionApp] Starting activity com.example.leapmotionapp.MainActivity on device emulator-5554
[2014-07-04 09:12:12 - LeapMotionApp] Installation failed due to invalid URI!
[2014-07-04 09:12:12 - LeapMotionApp] Please check logcat output for more details.
[2014-07-04 09:12:12 - LeapMotionApp] Launch canceled!
[2014-07-04 09:12:12 - LeapMotionApp] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.leapmotionapp/.MainActivity }

这是logcat输出:

and Here is the logcat output:

07-04 13:12:12.930: E/AndroidRuntime(761): FATAL EXCEPTION: main
07-04 13:12:12.930: E/AndroidRuntime(761): Process: com.example.leapmotionapp, PID: 761
07-04 13:12:12.930: E/AndroidRuntime(761): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.leapmotionapp/com.example.leapmotionapp.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
07-04 13:12:12.930: E/AndroidRuntime(761):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
07-04 13:12:12.930: E/AndroidRuntime(761):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
07-04 13:12:12.930: E/AndroidRuntime(761):  at android.app.ActivityThread.access$800(ActivityThread.java:138)
07-04 13:12:12.930: E/AndroidRuntime(761):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
07-04 13:12:12.930: E/AndroidRuntime(761):  at android.os.Handler.dispatchMessage(Handler.java:102)
07-04 13:12:12.930: E/AndroidRuntime(761):  at android.os.Looper.loop(Looper.java:136)
07-04 13:12:12.930: E/AndroidRuntime(761):  at android.app.ActivityThread.main(ActivityThread.java:5026)
07-04 13:12:12.930: E/AndroidRuntime(761):  at java.lang.reflect.Method.invokeNative(Native Method)
07-04 13:12:12.930: E/AndroidRuntime(761):  at java.lang.reflect.Method.invoke(Method.java:515)
07-04 13:12:12.930: E/AndroidRuntime(761):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
07-04 13:12:12.930: E/AndroidRuntime(761):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
07-04 13:12:12.930: E/AndroidRuntime(761):  at dalvik.system.NativeStart.main(Native Method)
07-04 13:12:12.930: E/AndroidRuntime(761): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
07-04 13:12:12.930: E/AndroidRuntime(761):  at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:275)
07-04 13:12:12.930: E/AndroidRuntime(761):  at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2872)
07-04 13:12:12.930: E/AndroidRuntime(761):  at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3129)
07-04 13:12:12.930: E/AndroidRuntime(761):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:303)
07-04 13:12:12.930: E/AndroidRuntime(761):  at android.app.Activity.setContentView(Activity.java:1930)
07-04 13:12:12.930: E/AndroidRuntime(761):  at com.example.leapmotionapp.MainActivity.onCreate(MainActivity.java:15)
07-04 13:12:12.930: E/AndroidRuntime(761):  at android.app.Activity.performCreate(Activity.java:5242)
07-04 13:12:12.930: E/AndroidRuntime(761):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
07-04 13:12:12.930: E/AndroidRuntime(761):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
07-04 13:12:12.930: E/AndroidRuntime(761):  ... 11 more

任何帮助,不胜感激。 以下是我之前提到的问题的.java和.xml文件的代码

any help, would be appreciated. Here is the code for the .java and .xml files from a question I asked earlier

欣赏所有帮助

编辑:
这是清单:

Here is the manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.leapmotionapp"
    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=".MainActivity"
            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>


推荐答案

你的案例,有这个错误:

Your case, have this error:

android.util.AndroidRuntimeException:您不能组合滑动解雇和操作栏。

更改目标版本:

android:targetSdkVersion =21

android:targetSdkVersion="21"

TO:

android:targetSdkVersion =19

android:targetSdkVersion="19"

看到这里

targetSdkVersion设置

这篇关于Android应用不会启动(使用Eclipse)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆