Windows上的PhoneGap Android运行问题

时间:2014-06-19 05:31:05

标签: android cordova

我尝试使用phonegap创建新项目。在创建过程中我得到了一条消息,如下所示:

创作:

 [phonegap] missing library com.phonegap.helloworld/www/3.5.0

上述陈述是否有任何问题。我对此一无所知。我是手机新手。

运行项目问题:

D:\WS\myapp>phonegap run android

 [phonegap] detecting Android SDK environment...
    [phonegap] using the local environment
    [phonegap] adding the Android platform...
    Creating Cordova project for the Android platform:
            Path: platforms\android
            Package: com.phonegap.helloworld
            Name: HelloWorld
            Android target: android-19
    Copying template files...
    Running: android update project --subprojects --path "platforms\android" --targe
    t android-19 --library "CordovaLib"
    Resolved location of library project to: D:\WS\myapp\platforms\android\Cordo
    vaLib
    Updated and renamed default.properties to project.properties
    Updated local.properties
    No project name specified, using Activity name 'HelloWorld'.
    If you wish to change it, edit the first line of build.xml.
    Added file D:\WS\myapp\platforms\android\build.xml
    Added file D:\WS\myapp\platforms\android\proguard-project.txt
    Updated project.properties
    Updated local.properties
    No project name specified, using project folder name 'CordovaLib'.
    If you wish to change it, edit the first line of build.xml.
    Added file D:\WS\myapp\platforms\android\CordovaLib\build.xml
    Added file D:\WS\myapp\platforms\android\CordovaLib\proguard-project.txt

    Project successfully created.
    cp: no such file or directory: D:\WS\myapp\icon.png

    cp: no such file or directory: D:\WS\myapp\icon.png

    cp: no such file or directory: D:\WS\myapp\res\icon\ios\icon-72.png

    cp: no such file or directory: D:\WS\myapp\icon.png

    [phonegap] compiling Android...
    cp: no such file or directory: D:\WS\myapp\icon.png

    cp: no such file or directory: D:\WS\myapp\icon.png

    cp: no such file or directory: D:\WS\myapp\res\icon\ios\icon-72.png

    cp: no such file or directory: D:\WS\myapp\icon.png

    Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li
    b\tools.jar
    Buildfile: D:\WS\myapp\platforms\android\build.xml

    -set-mode-check:

    -set-debug-files:

    -check-env:
     [checkenv] Android SDK Tools Revision 22.6.3
     [checkenv] Installed at C:\Program Files\Android\adt-bundle-windows-x86_64-2014
    0321\adt-bundle-windows-x86_64-20140321\sdk

    -setup:
         [echo] Project Name: HelloWorld
      [gettype] Project Type: Application

    -set-debug-mode:

    -debug-obfuscation-check:

    -pre-build:

    -build-setup:
    [getbuildtools] Using latest Build Tools: 19.1.0
         [echo] Resolving Build Target for HelloWorld...
    [gettarget] Project Target:   Android 4.4.2
    [gettarget] API level:        19
         [echo] ----------
         [echo] Creating output directories if needed...
        [mkdir] Created dir: D:\WS\myapp\platforms\android\ant-build
        [mkdir] Created dir: D:\WS\myapp\platforms\android\ant-build\res
        [mkdir] Created dir: D:\WS\myapp\platforms\android\ant-build\rsObj
        [mkdir] Created dir: D:\WS\myapp\platforms\android\ant-build\rsLibs
        [mkdir] Created dir: D:\WS\myapp\platforms\android\ant-gen
        [mkdir] Created dir: D:\WS\myapp\platforms\android\ant-build\classes
        [mkdir] Created dir: D:\WS\myapp\platforms\android\ant-build\dexedLibs
         [echo] ----------
         [echo] Resolving Dependencies for HelloWorld...
    [dependency] Library dependencies:
    [dependency]
    [dependency] ------------------
    [dependency] Ordered libraries:
    [dependency]
    [dependency] ------------------
         [echo] ----------
         [echo] Building Libraries with 'debug'...

    nodeps:

    -set-mode-check:

    -set-debug-files:

    -check-env:
     [checkenv] Android SDK Tools Revision 22.6.3
     [checkenv] Installed at C:\Program Files\Android\adt-bundle-windows-x86_64-2014
    0321\adt-bundle-windows-x86_64-20140321\sdk

    -setup:
         [echo] Project Name: CordovaLib
      [gettype] Project Type: Android Library

    -set-debug-mode:

    -debug-obfuscation-check:

    -pre-build:

    -build-setup:
    [getbuildtools] Using latest Build Tools: 19.1.0
         [echo] Resolving Build Target for CordovaLib...
    [gettarget] Project Target:   Android 4.4.2
    [gettarget] API level:        19
         [echo] ----------
         [echo] Creating output directories if needed...
        [mkdir] Created dir: D:\WS\myapp\platforms\android\CordovaLib\res
        [mkdir] Created dir: D:\WS\myapp\platforms\android\CordovaLib\libs
        [mkdir] Created dir: D:\WS\myapp\platforms\android\CordovaLib\ant-build
        [mkdir] Created dir: D:\WS\myapp\platforms\android\CordovaLib\ant-build\
    res
        [mkdir] Created dir: D:\WS\myapp\platforms\android\CordovaLib\ant-build\
    rsObj
        [mkdir] Created dir: D:\WS\myapp\platforms\android\CordovaLib\ant-build\
    rsLibs
        [mkdir] Created dir: D:\WS\myapp\platforms\android\CordovaLib\ant-gen
        [mkdir] Created dir: D:\WS\myapp\platforms\android\CordovaLib\ant-build\
    classes
        [mkdir] Created dir: D:\WS\myapp\platforms\android\CordovaLib\ant-build\
    dexedLibs
         [echo] ----------
         [echo] Resolving Dependencies for CordovaLib...
    [dependency] Library dependencies:
    [dependency] No Libraries
    [dependency]
    [dependency] ------------------

    -code-gen:
    [mergemanifest] Merging AndroidManifest files into one.
    [mergemanifest] Manifest merger disabled. Using project manifest only.
         [echo] Handling aidl files...
         [aidl] No AIDL files to compile.
         [echo] ----------
         [echo] Handling RenderScript files...
         [echo] ----------
         [echo] Handling Resources...
         [aapt] Generating resource IDs...
         [echo] ----------
         [echo] Handling BuildConfig class...
    [buildconfig] Generating BuildConfig class.

    -pre-compile:

    -compile:
        [javac] Compiling 89 source files to D:\WS\myapp\platforms\android\Cordo
    vaLib\ant-build\classes

    BUILD FAILED
    C:\Program Files\Android\adt-bundle-windows-x86_64-20140321\adt-bundle-windows-x
    86_64-20140321\sdk\tools\ant\build.xml:601: The following error occurred while e
    xecuting this line:
    C:\Program Files\Android\adt-bundle-windows-x86_64-20140321\adt-bundle-windows-x
    86_64-20140321\sdk\tools\ant\build.xml:720: The following error occurred while e
    xecuting this line:
    C:\Program Files\Android\adt-bundle-windows-x86_64-20140321\adt-bundle-windows-x
    86_64-20140321\sdk\tools\ant\build.xml:734: Error running javac.exe compiler

    Total time: 1 second
    Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,D:\WS\myapp\plat
    forms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
    { [Error: D:\WS\myapp\platforms\android\cordova\build.bat: Command failed wi
    th exit code 2] code: 2 }
       [error] D:\WS\myapp\platforms\android\cordova\build.bat: Command failed w
    ith exit code 2

    D:\WS\myapp>

我对上述错误一无所知。你能不能建议我该怎么做?

0 个答案:

没有答案