代码之家  ›  专栏  ›  技术社区  ›  Adam Harte

Android未加载应用程序

  •  0
  • Adam Harte  · 技术社区  · 14 年前

    我正在经历 Android Hello World 但是当我去 Run > Run 在Eclipse中,它加载模拟器,花费一些时间,然后加载Android主屏幕。我的应用程序不会像教程所说的那样自动加载,我在应用程序列表中找不到它。

    如何启动我的应用程序?我该怎么办?

    我正在使用Eclipse,目标是Android 2.2

    编辑*

    当我从Eclipse运行应用程序时,我在Concolle中得到这个输出:

    // Android Launch!
    // adb is running normally.
    // Performing com.adamharte.helloandroid.HelloAndroid activity launch
    // Automatic Target Mode: launching new emulator with compatible AVD 'my_avd'
    // Launching a new emulator with Virtual Device 'my_avd'
    

    模拟器从一个黑屏开始说“android_uuu”,然后显示一个闪烁的蓝色android标志,然后进入“解锁”屏幕。我把锁拖到右边,它就会进入Android主屏幕。我在任何主屏幕或应用程序列表上都找不到我的“地狱世界”应用程序。

    3 回复  |  直到 14 年前
        1
  •  0
  •   Zaradaqaw    14 年前

    第一次运行应用程序时,您是否以Android应用程序的身份运行?如果你不这样做,Eclipse会做错事。

        2
  •  0
  •   FreewheelNat    14 年前

    通常,当你在模拟器上看到主屏幕时,它会说“按菜单解锁”,所以一定要这样做。

    另外,检查控制台的内容(您应该在Eclipse中找到这个选项卡)。它应该指示它已经安装了APK,然后指示它正在启动活动。

    完整输入应该类似于此

    [2010-08-24 10:15:05 - Big Words] Android Launch!
    [2010-08-24 10:15:05 - Big Words] adb is running normally.
    [2010-08-24 10:15:05 - Big Words] Performing net.cogitas.bigwords.BigWords activity launch
    [2010-08-24 10:15:08 - Big Words] Launching a new emulator with Virtual Device '16'
    [2010-08-24 10:15:11 - Big Words] New emulator found: emulator-5554
    [2010-08-24 10:15:11 - Big Words] Waiting for HOME ('android.process.acore') to be launched...
    [2010-08-24 10:15:48 - Big Words] WARNING: Unknown device API version!
    [2010-08-24 10:15:48 - Big Words] HOME is up on device 'emulator-5554'
    [2010-08-24 10:15:48 - Big Words] Uploading Big Words.apk onto device 'emulator-5554'
    [2010-08-24 10:15:49 - Big Words] Installing Big Words.apk...
    [2010-08-24 10:16:04 - Big Words] Success!
    [2010-08-24 10:16:04 - Big Words] Starting activity net.cogitas.bigwords.BigWords on device 
    [2010-08-24 10:16:15 - Big Words] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=net.cogitas.bigwords/.BigWords }
    
        3
  •  0
  •   Adam Harte    14 年前

    您必须确保在Android SDK和AVD Manager中安装了正确的软件包。为了安全起见,只需安装所有可用的软件包。然后,您必须确保在Eclipse中为您的SDK设置了正确的路径。

    还要确保你已经为你将要使用的目标制作了一个Android虚拟设备(AVD)。

    要额外保存,请在安装或配置时以管理员身份运行所有内容。