Android应用程序没有任何设备上运行 [英] Android App not running on any device

查看:171
本文介绍了Android应用程序没有任何设备上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个仿真器和设备上运行任何应用程序的麻烦。只是运行简单的Hello World的应用程序无法正常工作。该应用程序被安装在模拟器上,但从来没有执行。我能找到它,当我去菜单 - >管理应用程序,但我可以从那里唯一能做的就是将其卸载。它似乎还有未迫使其自动运行的设置。

I'm having trouble running ANY app on both an emulator and a device. Just running the simple "Hello World" app is not working. The app gets installed on the emulator but never executes. I can find it when I go Menu -> Manage Apps but the only thing I can do from there is uninstall it. It seems there is a setting that is not forcing it to run automatically.

此外,这东西很奇怪是我的电脑不会让我安装新的更新。它只是说下载.....,但没有发生过。我通过进入带网络安全模式解决了这个问题,但我现在还不能运行任何应用程序。任何想法???

Also, something that was weird was my computer would never let me install the new updates. It would just say "Downloading ....." but nothing ever happened. I fixed the problem by going into Safe Mode with Networking but I can still not run any app. Any ideas???

下面是它说当我去运行方式 - > Android应用程序

Here is what it says when I go to Run as -> Android App

[2012-08-31 08:17:52 - at] New emulator found: emulator-5554 
[2012-08-31 08:17:52 - at]   Waiting for HOME ('android.process.acore') to be launched... [2012-08-31 08:19:13 - at] HOME is up on device 'emulator-5554' 
[2012-08-31 08:19:13 - at] Uploading at.apk onto device 'emulator-5554' 
[2012-08-31 08:19:13 - at] Installing at.apk... 
[2012-08-31 08:20:03 - at] Success! 
[2012-08-31 08:20:03 - at] \at\bin\at.apk installed on device 
[2012-08-31 08:20:03 - at] Done!

下面是我的清单文件:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="c.panic"
android:versionCode="1"
android:versionName="1.0" >

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

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="parent" />
    </activity>
</application>

感谢。

推荐答案

您已经改变你的主要活动的&LT;意向滤光器&gt; 在标签过滤的Andr​​oidManifest.xml 文件。

You've to change your main activity's <intent-filter> tag filter in AndroidManifest.xml file.

<application android:name="......"
    android:icon="@drawable/app_icon"
    android:label="@string/app_name" >
        <activity android:name=".yourActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

手段,你已经改变你的活动的&lt;作用&GT; &LT;类别&GT;

修改

只要改变像下面在清单文件。这将启动应用程序。

Just change like below in your manifest file. It will launch your application.

<activity
    android:name=".MainActivity"
    android:label="@string/title_activity_main" >
    <meta-data
        android:name="android.support.PARENT_ACTIVITY"
        android:value="parent" />
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
</activity>

这篇关于Android应用程序没有任何设备上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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