【发布时间】:2018-03-26 09:54:51
【问题描述】:
我是初学者程序员。我在尝试将 HTML 5 网站转换为 Android 应用和 IOS 应用时需要一些帮助,
但我有以下问题:
D:\andriod\anditest1>cordova build android --verbose
No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform android
Android Studio project detected
Checking config.xml for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing...
Generating platform-specific config.xml from defaults for android at D:\andriod\anditest1\platforms\android\app\src\main\res\xml\config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [www, platforms\android\platform_www] to platforms\android\app\src\main\assets\www
Wrote out android application name "THMLhybrid" to D:\andriod\anditest1\platforms\android\app\src\main\res\values\strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000
Wrote out Android package name "com.cmsfreindly.com" to D:\andriod\anditest1\platforms\android\app\src\main\java\com\cmsfreindly\com\MainActivity.java
This app does not have launcher icons defined
This app does not have splash screens defined
This app does not have additional resource files defined
Prepared android project successfully
No scripts found for hook "after_prepare".
No scripts found for hook "before_compile".
(node:2340) UnhandledPromiseRejectionWarning: CordovaError: Failed to find 'ANDROID_HOME' environment variable. Try setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.
at D:\andriod\anditest1\platforms\android\cordova\lib\check_reqs.js:305:19
at _fulfilled (D:\andriod\anditest1\platforms\android\cordova\node_modules\q\q.js:854:54)
at self.promiseDispatch.done (D:\andriod\anditest1\platforms\android\cordova\node_modules\q\q.js:883:30)
at Promise.promise.promiseDispatch (D:\andriod\anditest1\platforms\android\cordova\node_modules\q\q.js:816:13)
at D:\andriod\anditest1\platforms\android\cordova\node_modules\q\q.js:877:14
at runSingle (D:\andriod\anditest1\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (D:\andriod\anditest1\platforms\android\cordova\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
(node:2340) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2340) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
D:\andriod\anditest1>
除了java oracle,还有什么缺少的工具需要下载吗?
【问题讨论】:
-
请考虑修改您在此问题中发布的代码示例。就目前而言,它的格式和范围使我们很难为您提供帮助;这是一个great resource,可以帮助您开始。 -1,不要走错路。否决票是我们在这里指出内容问题的方式;改进您的格式和代码示例,我(或有人会)很乐意将其还原。祝你的代码好运!
标签: java android node.js xml cordova