当前位置: 首页 > 知识库问答 >
问题:

执行phonegap命令cordova build时出错

许承悦
2023-03-14

我正在执行命令“cordova build”(完成以上设置后,举例说明了此链接Phonegap的命令行界面)。
但note.js返回以下错误:

从“android”平台的默认值生成config.xml
准备android项目
通过命令“cmd”/C
C:\net\phoneGap\hello\platforms\android\cordova\BUILD
错误:生成android项目时出错。执行“ant”debug-f“C:\net\phoneGap\hello\platforms\android\BUILD.xml”“:
生成失败
C:\net\templates\phoneGap\android-sdk\tools\ant\BUILD.xml:601:执行此行时出现以下错误

在ChildProcess。(C:\users\myuserpc\appdata\roaming\npm\node_module\cordova\src\compile.js:65:22)
在childprocess.eventemitter.emit(events.js:98:17)
在maybeClose(child_process.js:743:16)
在socket。(child_process.js:956:11)
在socket.eventemitter.emit(events.js:95:17)
在pipe.close(net.js:466:12)

我的config.xml

<widget id="com.example.hello" version="0.0.1">
<name>HelloWorld</name>
<description>
    A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@callback.apache.org" href="http://phonegap.com">
    Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
<preference name="Fullscreen" value="true" />
<preference name="WebViewBounce" value="true" />
<feature name="Device">
    <param name="android-package" value="org.apache.cordova.device.Device" />
</feature>

和我的AndroidManifest.xml

<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" android:windowSoftInputMode="adjustPan" package="com.example.hello" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:debuggable="true" android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:configChanges="orientation|keyboardHidden|keyboard|locale" android:label="@string/app_name" android:name="HelloWorld" android:theme="@android:style/Theme.Black.NoTitleBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />

共有1个答案

呼延靖
2023-03-14

看起来您当前已经安装了Java运行时环境(JRE)。您需要Java开发工具包(JDK)。你可以去甲骨文公司。您的路径似乎使用%JAVA_HOME%\bin设置正确。我相信一旦安装了JDK,您的%JAVA_HOME%环境变量将更改为类似于:C:\Program Files\java\jdk1.7.0_52。当然,版本号可能略有不同。

 类似资料:
  • 我在执行命令时出错

  • 问题内容: 尝试构建时出现以下错误: Jenkins 2.7.1在Windows Server 2012 R2上运行(在Jenkins 2.7.4上发生了相同的错误)。我可以通过git命令行克隆仓库,没有任何问题。发生这种情况时,我可以在任务管理器屏幕快照中看到多个git进程树,如果我稍等片刻,我会在Jenkins中看到它。 问题答案: 罪魁祸首是Git插件。更新后开始工作。我正在使用2.5.3版

  • 今天我用Mac OS X Mavericks尝试了PhoneGap/Cordova。iOS版的构建进展顺利,但Android版的构建并非没有猜测。 我通过Android SDK Manager安装了Android 4.2.2(我不得不使用旧的API v17,因为它与较新的API不兼容),为SDK的和添加了,并认为我已经准备好通过运行命令起飞: 然而,我得到了以下错误:

  • 我在我的代码中包括boost,cpprest和openssl,但它给我的错误像follow在android studio使用ndk我给了所有路径的目录和添加到程序它构建成功,但当我运行它时,它给我以下错误 我的cmakelist.txt是 android{compileSdkVersion 28 defaultConfig{applicationId“com.example.dell.cppadd

  • 本文向大家介绍解决执行docker daemon命令时出错的问题,包括了解决执行docker daemon命令时出错的问题的使用技巧和注意事项,需要的朋友参考一下 最近在工作中遇到了一个问题,在一开始执行docker daemon命令时总是会出错导致进程stop,按照网上的方法在/etc/fstab文件里添加了一行 这时Docker daemon可以起来了,但是有了新的问题——执行docker r

  • 我试图通过上的教程将Django与Postgres、Gunicorn和Nginx对接 https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/ docker在第7步时,我遇到了一个错误,即, 步骤7/23:运行pip-wheel-no-cache-dir-no-deps-wheel-dir/usr