java - 检测到 Android Studio 项目

标签 java android node.js xml cordova

我是初学者程序员。我需要一些帮助,因为我正在尝试将 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之外,还缺少什么工具需要下载吗?

最佳答案

您需要下载Android Studio并确保路径位于环境变量ANDROID_HOME中。您还需要 Java SE 开发工具包 8u162。

Android 工作室 https://developer.android.com/studio/index.html

Java http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

关于java - 检测到 Android Studio 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49488620/

相关文章:

java - Android属性动画: how to increase view height?

android - Messenger InstantGames - Web 请求在 Messenger 网页上运行良好,但在通过 Messenger 移动应用程序播放时失败

java - 非法参数异常 : Comparison method violates it's general contract

android - 将应用发布到生产后将近一天

node.js - 使用 express 在 node.js 中呈现 LESS.js 样式表的最佳方法是什么?

node.js - 无法在 Pivotal Web Services 上 sails

node.js - 具有事件目录权限的nodejs网站

java - HttpClient 身份验证 -

java - 在 Linux 上从 Jersey 返回 Json 抛出异常

java - MQQueueManager.<init> 为指定的 MQEnvironment.sslCipherSuite 引发 MQJE001 : Completion Code '2' , 原因 '2400'