Android的示例应用程序没有显示出来示例、应用程序、Android

2023-09-07 11:58:37 作者:穿过指缝的流光

下面的新Android开发者。我下面的教程,在 http://www.vogella.de/ 。第一个应用程序(不温度转换)的作品。第二个(做preferences和使用的菜单)谁也不出现了。我同时使用太阳神和伽利略尝试。我试着重新安装Android SDK中。我试图消除测试设备并重新创建它。还有人说,本教程的工作。

在其他的应用作品,它没有得到两条线没有启动的活动找到了!和推出仅同步应用程序包的设备上。

我看到的:

  ------------------------------
...] Android的推出!
...]亚洲开发银行运行正常。
...]没有发射活动找到了!
...]的推出只会同步应用程序包的设备上!
...]执行同步
...]目标自动模式:利用现有的模拟器模拟器-5554'运行兼容AVD为TestDevice
...]上传de.vogella.android。preferences.apk到器件的模拟器,5554
...]安装de.vogella.android。preferences.apk ...
...] 成功!
...] \ de.vogella.android。preferences \ BIN \ de.vogella.android。preferences.apk安装设备
......]完成!
 
哪个Android应用程序正在显示弹出广告 如何发现和删除它们

更新:这里是从我的Andr​​oid清单文件中的文本

 <舱单
    的xmlns:机器人=schemas.android.com/apk/res/android;
    包=de.vogella.android。preferences
    安卓版code =1
    机器人:VERSIONNAME =1.0>
    <应用机器人:图标=@可绘制/图标机器人:标签=@字符串/ APP_NAME>
        <活动机器人:名称=机器人你好preferences。:标签=@字符串/ APP_NAME>
        < /活性GT;
        <活动机器人:标签=preferences机器人:NAME =preferences>
        < /活性GT;
    < /用途>
    <使用-SDK安卓的minSdkVersion =8/>
< /舱单>
 

解决方案

下面的答案,我必须找到其他地方。看来你必须具备以下元素:

 <意向滤光器>
    <作用机器人:名称=android.intent.action.MAIN/>
    <类机器人:名称=android.intent.category.LAUNCHER/>
&所述; /意图滤光器>
 

在你的的Andr​​oidManifest.xml 的文件。有一次,我添加了这个,然后右键点击来启动Android应用程序的项目名称,应用程序,然后显示在菜单面板。

的Eclipse把这个(意图过滤器的)元素有我的第一个实验性的应用程序,但它没有这样做我的青睐,为我创造了第二个,我现在还在调试还没有其他(也可能是Eclipse相关的)原因。 (创建新的Andr​​oid项目时,我可能填出来的东西是错误的。)

New Android developer here. I'm following a tutorial at http://www.vogella.de/. The first applications (does temperature conversion) works. The second (does preferences and uses a menu) one never shows up. I've tried using both Helios and Galileo. I've tried re-installing Android SDK. I've tried removing the test device and re-creating it. Others say this tutorial works.

When the other app works, it doesn't get the two lines "No Launcher activity found!" and "The launch will only sync the application packages on the device."

What I see:

------------------------------
...] Android Launch!
...] adb is running normally.
...] No Launcher activity found!
...] The launch will only sync the application package on the device!
...] Performing sync
...] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'TestDevice'
...] Uploading de.vogella.android.preferences.apk onto device 'emulator-5554'
...] Installing de.vogella.android.preferences.apk...
...] Success!
...] \de.vogella.android.preferences\bin\de.vogella.android.preferences.apk installed on device
...] Done!

UPDATE: here is the text from my Android manifest file

<manifest 
    xmlns:android="schemas.android.com/apk/res/android";
    package="de.vogella.android.preferences" 
    android:versionCode="1" 
    android:versionName="1.0"> 
    <application android:icon="@drawable/icon" android:label="@string/app_name"> 
        <activity android:name=".HelloPreferences" android:label="@string/app_name">
        </activity> 
        <activity android:label="Preferences" android:name="Preferences">
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="8" />
</manifest>

解决方案

Here's the answer, which I had to find elsewhere. It seems that you must have the following element:

<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

inside your AndroidManifest.xml file. Once I added this, then right-clicked on the project name to launch the Android Application, the app then showed up in the menu panel.

Eclipse put this (intent-filter) element there for my first experimental application, but it did not do me the favor for the second one I created, which I'm still debugging for yet other (and probably Eclipse-related) reasons. (I probably filled something out wrong when creating the new Android project.)