我在做离子4,
离子科尔多瓦构建Android
Android Studio项目检测到Android_HOME=/Users/user/Library/Android/sdk JAVA_HOME=/Library/JAVA/JavaVirtualMachines/jdk-11。jdk 1.8的jdk/Contents/Home需求检查失败
java的详细信息
java版本
users-MacBook-Pro-3:库user$java-version java version"11"2018-09-25Java(TM)SE运行时环境18.9(构建11 28)JavaHotSpot(TM)64位服务器VM 18.9(构建11 28,混合模式)
- Details of My Mac os
Macbook pro late 2011
os installed - Ox x ei caption
angular.json文件
{
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
"version": 1,
"defaultProject": "app",
"newProjectRoot": "projects",
"projects": {
"app": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "www",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "assets"
},
{
"glob": "**/*.svg",
"input": "node_modules/ionicons/dist/ionicons/svg",
"output": "./svg"
}
],
"styles": [
{
"input": "src/theme/variables.scss"
},
{
"input": "src/global.scss"
}
],
"scripts": [],
"es5BrowserSupport": true
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
},
"ci": {
"progress": false
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "app:build"
},
"configurations": {
"production": {
"browserTarget": "app:build:production"
},
"ci": {
"progress": false
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "app:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [],
"scripts": [],
"assets": [
{
"glob": "favicon.ico",
"input": "src/",
"output": "/"
},
{
"glob": "**/*",
"input": "src/assets",
"output": "/assets"
}
]
},
"configurations": {
"ci": {
"progress": false,
"watch": false
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
},
"ionic-cordova-build": {
"builder": "@ionic/angular-toolkit:cordova-build",
"options": {
"browserTarget": "app:build"
},
"configurations": {
"production": {
"browserTarget": "app:build:production"
}
}
},
"ionic-cordova-serve": {
"builder": "@ionic/angular-toolkit:cordova-serve",
"options": {
"cordovaBuildTarget": "app:ionic-cordova-build",
"devServerTarget": "app:serve"
},
"configurations": {
"production": {
"cordovaBuildTarget": "app:ionic-cordova-build:production",
"devServerTarget": "app:serve:production"
}
}
}
}
},
"app-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "app:serve"
},
"configurations": {
"ci": {
"devServerTarget": "app:serve:ci"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"cli": {
"defaultCollection": "@ionic/angular-toolkit"
},
"schematics": {
"@ionic/angular-toolkit:component": {
"styleext": "scss"
},
"@ionic/angular-toolkit:page": {
"styleext": "scss"
}
}
}
您已经安装了JavaJDKversion11。对于ionic cordova,您需要JDK 8。阅读安装要求。
您可以在这里下载JDK 8
两者:
java -version
和:
javac -version
应该是Java8。可以通过运行以下命令在Linux(Debian)上更改:
sudo update-alternatives --config java
或:
sudo update-alternatives --config javac
我试图运行我的应用程序使用离子科尔多瓦运行Android,但它是失败的。 请帮忙。 谢谢 这是我的例外 > 错误:评估项目“CordovaLib”时出现问题。 com/google/gson/JsonParseException 尝试:使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。 得到更多的帮助https://help.gradl
嗨,我运行ionic命令时出现以下错误()。任何线索都将不胜感激。我的Java是9.0.1,错误消息对我来说没有意义。请提出你的想法。 ANDROID_HOME=C:\程序文件(x86)\Android\android-sdkJAVA_HOME=C:\程序文件\Java\jdk-9.0.1错误:JDK 1.8或更高版本的需求检查失败 [错误]运行科尔多瓦运行Android时出错(退出代码 1)。
每当我尝试使用ionic cordova构建--release android时,都会收到此错误消息: (节点:1512)未处理的promise拒绝警告:未处理的拒绝promise。此错误的原因可能是在没有catch块的异步函数中抛出,也可能是拒绝未使用.catch()处理的promise。(拒绝id:1)(节点:1512)[DEP0018]不推荐警告:不推荐未处理的promise拒绝。将来,未处
我试图在我的Android手机上运行我的科尔多瓦应用程序。我得到以下错误在构建:输入图像描述在这里 在此处输入图像描述 在我的环境变量中,路径设置为SDK、工具和平台工具。ANDROID_主页到SDK,JAVA_主页到JDK文件夹。
今天我一觉醒来,直到早上,我无法像几个小时前那样运行我的爱奥尼亚项目。 给予: 我试图删除Android平台,但没有帮助。 请建议我应该怎么做才能再次运行该项目。
我正在开发一台新的乌班图机器。我已经安装了最后一个离子版本,java 8,Android Studio。我创建了一个新的空白离子项目。 当我尝试运行时,出现以下错误: 有同样错误的人?有人知道解决方法吗?? 离子信息 cli程序包:(/usr/lib/node_modules) 全局程序包: 本地程序包: 系统: 环境变量: 杂项: 渐变 --version 渐变 4.1 构建时间:2017-08