zoukankan      html  css  js  c++  java
  • Android Failed to install HelloWorld.apk on device (null) Error

    编写第一个android程序就出现这个问题。摘抄网上的一个方法:

    问:

    I am new to Android. When I am running my android application in eclipse I am getting these messages in the console:

    [2011-03-08 12:57:35 - HelloWorld] ------------------------------
    [2011-03-08 12:57:35 - HelloWorld] Android Launch!
    [2011-03-08 12:57:35 - HelloWorld] adb is running normally.
    [2011-03-08 12:57:35 - HelloWorld] Performing com.oreilly.helloworld.HelloWorldActivity activity launch
    [2011-03-08 12:57:35 - HelloWorld] Automatic Target Mode: Preferred AVD 'MY_AVD' is not available. Launching new emulator.
    [2011-03-08 12:57:35 - HelloWorld] Launching a new emulator with Virtual Device 'MY_AVD'
    [2011-03-08 12:57:39 - HelloWorld] New emulator found: emulator-5554
    [2011-03-08 12:57:39 - HelloWorld] Waiting for HOME ('android.process.acore') to be launched...
    [2011-03-08 13:00:14 - HelloWorld] WARNING: Application does not specify an API level requirement!
    [2011-03-08 13:00:14 - HelloWorld] Device API version is 11 (Android 3.0)
    [2011-03-08 13:00:14 - HelloWorld] HOME is up on device 'emulator-5554'
    [2011-03-08 13:00:14 - HelloWorld] Uploading HelloWorld.apk onto device 'emulator-5554'
    [2011-03-08 13:00:14 - HelloWorld] Installing HelloWorld.apk...
    [2011-03-08 13:02:22 - HelloWorld] Failed to install HelloWorld.apk on device 'emulator-5554!
    [2011-03-08 13:02:22 - HelloWorld] (null)
    [2011-03-08 13:02:23 - HelloWorld] Launch canceled!
    

    How do I resolve the problems so that my application will launch?

    答:

    Try changing the ADB connection timeout. I think it defaults that to 5000ms and I changed mine to 10000ms to get rid of that problem. If you are in Eclipse, you can do this by going through Window -> Preferences and then it is in DDMS under Android.(我用这个成功了。)

  • 相关阅读:
    [LeetCode] 286. Walls and Gates 墙和门
    [LeetCode] Sparse Matrix Multiplication 稀疏矩阵相乘
    [LeetCode] 314. Binary Tree Vertical Order Traversal 二叉树的竖直遍历
    [LeetCode] 337. House Robber III 打家劫舍之三
    [LeetCode] Palindrome Pairs 回文对
    [LeetCode] 302. Smallest Rectangle Enclosing Black Pixels 包含黑像素的最小矩阵
    Nginx安装及配置详解
    Spring Boot项目属性配置
    maven仓库阿里云镜像配置
    maven仓库阿里云镜像配置
  • 原文地址:https://www.cnblogs.com/LNOMP/p/3612582.html
Copyright © 2011-2022 走看看