1

我正在尝试运行我的第一个android hello world 程序,我已经设置了Android SDK并安装了所需的软件包,然后使用AVD Manager创建了一个虚拟设备,然后在netbeans7.4中配置了androidsdk。我用常规配置在 netbeans 中创建了一个新的常规android 项目:

在此处输入图像描述

然后尝试在我使用AVD创建的设备上运行它,但只得到了结果:

在此处输入图像描述

这是调试结果

ant -f C:\\Users\\HP\\Documents\\NetBeansProjects\\haha debug
Android SDK Tools Revision 22.3.0
Installed at D:\Solace Android\Solace Data\adt-bundle-windows-x86_64-20130729\sdk
Project Name: haha
Project Type: Application
Using latest Build Tools: 19.0.0
Resolving Build Target for haha...
Project Target:   Android 4.4
API level:        19
WARNING: No minSdkVersion value set. Application will install on all Android versions.
----------
Creating output directories if needed...
Created dir: C:\Users\HP\Documents\NetBeansProjects\haha\bin
Created dir: C:\Users\HP\Documents\NetBeansProjects\haha\bin\res
Created dir: C:\Users\HP\Documents\NetBeansProjects\haha\bin\rsObj
Created dir: C:\Users\HP\Documents\NetBeansProjects\haha\bin\rsLibs
Created dir: C:\Users\HP\Documents\NetBeansProjects\haha\gen
Created dir: C:\Users\HP\Documents\NetBeansProjects\haha\bin\classes
Created dir: C:\Users\HP\Documents\NetBeansProjects\haha\bin\dexedLibs
----------
Resolving Dependencies for haha...
Library dependencies:
No Libraries
------------------
----------
Building Libraries with 'debug'...
No sub-builds to iterate on
Merging AndroidManifest files into one.
Manifest merger disabled. Using project manifest only.
Handling aidl files...
No AIDL files to compile.
----------
Handling RenderScript files...
----------
Handling Resources...
Generating resource IDs...
----------
Handling BuildConfig class...
Generating BuildConfig class.
Compiling 3 source files to C:\Users\HP\Documents\NetBeansProjects\haha\bin\classes
input: C:\Users\HP\Documents\NetBeansProjects\haha\bin\classes
Converting compiled files and external libraries into C:\Users\HP\Documents\NetBeansProjects\haha\bin\classes.dex...
Crunching PNG Files in source dir: C:\Users\HP\Documents\NetBeansProjects\haha\res
To destination dir: C:\Users\HP\Documents\NetBeansProjects\haha\bin\res
Processing image to cache: C:\Users\HP\Documents\NetBeansProjects\haha\res\drawable-hdpi\ic_launcher.png => C:\Users\HP\Documents\NetBeansProjects\haha\bin\res\drawable-hdpi\ic_launcher.png
  (processed image to cache entry C:\Users\HP\Documents\NetBeansProjects\haha\bin\res\drawable-hdpi\ic_launcher.png: 87% size of source)
Processing image to cache: C:\Users\HP\Documents\NetBeansProjects\haha\res\drawable-ldpi\ic_launcher.png => C:\Users\HP\Documents\NetBeansProjects\haha\bin\res\drawable-ldpi\ic_launcher.png
  (processed image to cache entry C:\Users\HP\Documents\NetBeansProjects\haha\bin\res\drawable-ldpi\ic_launcher.png: 0% size of source)
Processing image to cache: C:\Users\HP\Documents\NetBeansProjects\haha\res\drawable-mdpi\ic_launcher.png => C:\Users\HP\Documents\NetBeansProjects\haha\bin\res\drawable-mdpi\ic_launcher.png
  (processed image to cache entry C:\Users\HP\Documents\NetBeansProjects\haha\bin\res\drawable-mdpi\ic_launcher.png: 78% size of source)
Processing image to cache: C:\Users\HP\Documents\NetBeansProjects\haha\res\drawable-xhdpi\ic_launcher.png => C:\Users\HP\Documents\NetBeansProjects\haha\bin\res\drawable-xhdpi\ic_launcher.png
  (processed image to cache entry C:\Users\HP\Documents\NetBeansProjects\haha\bin\res\drawable-xhdpi\ic_launcher.png: 85% size of source)
Crunched 4 PNG files to update cache
Creating full resource package...
Current build type is different than previous build: forced apkbuilder run.
Creating haha-debug-unaligned.apk and signing it with a debug key...
Running zip align on final apk...
Debug Package: C:\Users\HP\Documents\NetBeansProjects\haha\bin\haha-debug.apk
Creating new property file: C:\Users\HP\Documents\NetBeansProjects\haha\bin\build.prop
Updating property file: C:\Users\HP\Documents\NetBeansProjects\haha\bin\build.prop
Updating property file: C:\Users\HP\Documents\NetBeansProjects\haha\bin\build.prop
Updating property file: C:\Users\HP\Documents\NetBeansProjects\haha\bin\build.prop
debug:
BUILD SUCCESSFUL (total time: 12 seconds)
4

1 回答 1

1

检查您的计算机规格。AVD真的很慢而且很重,所以启动Android需要很多时间(i7 3610qm和8GB ram运行linux需要3分钟启动,一旦启动就很慢)。

尝试使用BlueStacks运行 Android ,它是一个类似于 AVD 的 android 虚拟设备,但 IMO 它工作得更好,速度要快得多。

于 2013-11-11T14:36:02.240 回答