即使我跑,我仍然得到消息:
sudo离子cordova构建 android
我有这些设置:
我唯一能想到的就是由于插件的钩子中没有执行属性可能……
sudo离子cordova构建androID
....> cordova build androIDANDROID_HOME=/Users/jgf/library/AndroID/sdkJAVA_HOME=/library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/HomeSubproject Path: CordovalibError: spawn EACCES[ERROR] An error occurred while running cordova build androID (exit code 1).
关于这个错误最令人讨厌的事情之一就是它没有给你足够的细节而且隐藏了问题的根本原因……
我已经尝试添加诸如–verbose和–release标志之类的东西,但在解决问题方面没有任何改变.
运行Mac OS X High SIErra 10.13.2
离子信息
cli packages: (/Users/jgf/.nvm/versions/node/v8.9.3/lib/node_modules) @ionic/cli-utils : 1.18.0 ionic (Ionic Cli) : 3.18.0global packages: cordova (Cordova Cli) : 7.0.1local packages: @ionic/app-scripts : 3.1.5 Cordova Platforms : androID 6.4.0 browser 4.1.0 ios 4.4.0 Ionic Framework : ionic-angular 3.9.2System: AndroID SDK Tools : 26.1.1 Node : v8.9.3 npm : 5.6.0 OS : macOS High SIErra Xcode : Xcode 9.2 Build version 9C40bEnvironment Variables: ANDROID_HOME : /Users/jgf/library/AndroID/sdkMisc: backend : legacy
cordova平台版
Installed platforms: androID 6.4.0 browser 4.1.0 ios 4.4.0Available platforms: blackBerry10 ~3.8.0 (deprecated) osx ~4.0.1 webos ~3.7.0
cordova构建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 projectConfig.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 androIDChecking config.xml for saved plugins that haven't been added to the projectChecking for any plugins added to the project that have not been installed in androID platformNo differences found between plugins added to project and installed in androID platform. Continuing...Generating platform-specific config.xml from defaults for androID at /opt/IonicProjects/aews_official_rc_1.2.09/platforms/androID/res/xml/config.xmlMerging project's config.xml into platform-specific androID config.xmlMerging and updating files from [www,platforms/androID/platform_www] to platforms/androID/assets/wwwWrote out androID application name "ET-Mobile" to /opt/IonicProjects/aews_official_rc_1.2.09/platforms/androID/res/values/strings.xmlandroid-versionCode not found in config.xml. Generating a code based on version in config.xml (0.0.1): 1Wrote out AndroID package name "com.extratechnology.etmobile" to /opt/IonicProjects/aews_official_rc_1.2.09/platforms/androID/src/com/extratechnology/etmobile/MainActivity.javaUpdating icons at platforms/androID/resUpdating splash screens at platforms/androID/resThis app does not have additional resource files definedPrepared androID project successfullyNo scripts found for hook "after_prepare".No scripts found for hook "before_compile".ANDROID_HOME=/Users/jgf/library/AndroID/sdkJAVA_HOME=/library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/HomeSubproject Path: CordovalibRunning command: /opt/IonicProjects/aews_official_rc_1.2.09/platforms/androID/gradlew cdvBuildDeBUG -b /opt/IonicProjects/aews_official_rc_1.2.09/platforms/androID/build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -PandroID.useDeprecatedndk=trueError: spawn EACCES
有AndroID Studio 3.0.1
我的.profile(松散于this)包含:
export JAVA_HOME=$(/usr/libexec/java_home)export ANDROID_HOME=~/library/AndroID/sdk#ANDROID_HOME=/opt/androID-sdkexport NVM_DIR="$HOME/.nvm"export PATH=${JAVA_HOME}/bin:${PATH}export PATH=${ANDROID_HOME}/platform-tools:${PATH}export PATH=${ANDROID_HOME}/tools:${PATH}export PATH=${ANDROID_HOME}/tools/bin:${PATH}#${ANDROID_HOME}/tools/bin:${HOME}/bin:.export GRADLE_HOME="/Applications/AndroID Studio.app/Contents/gradle/gradle-4.1"export PATH=${PATH}:${GRADLE_HOME}/bin
这是我此时唯一的另一个想法..在AndroID Studio中的空间.
这可能会弄乱路径,所以我倾向于将其复制出来.
哪个gradle会产生正确的路径…
/Applications/AndroID Studio.app/Contents/gradle/gradle-4.1/bin/gradle
(之前我曾卸载过旧的brew版本,但指向带有路径的AndroID Studio版本似乎没有任何区别).
最后一个脚注……当时androID是一个可以同时用于sdk和apk管理器功能的命令,你曾经不得不做一些像接受许可条款或类似的东西.
没有什么比这更像我在这里也不见了?
只是,我正在抓我的选择.
在SurajRao的提示之后,运行cordova构建androID –verbose,
我现在正在解决最初的问题.
这是通过这样做完成的:
cd <project folder>/platform/androID/chmod +x build.gradle chmod +x gradlew
它现在产生:
Error: /opt/IonicProjects/aews_official_rc_1.2.09/platforms/androID/gradlew: Command Failed with exit code 1 Error output:FAILURE: Build Failed with an exception.* What went wrong:A problem occurred configuring project ':Cordovalib'.> Could not resolve all files for configuration ':Cordovalib:classpath'. > Could not resolve org.bouncycastle:bcprov-jdk15on:1.48. required by: project :Cordovalib > com.androID.tools.build:gradle:2.2.3 > com.androID.tools.build:gradle-core:2.2.3 > com.androID.tools.build:builder:2.2.3 project :Cordovalib > com.androID.tools.build:gradle:2.2.3 > com.androID.tools.build:gradle-core:2.2.3 > com.androID.tools.build:builder:2.2.3 > com.androID.tools:sdk-common:25.2.3 project :Cordovalib > com.androID.tools.build:gradle:2.2.3 > com.androID.tools.build:gradle-core:2.2.3 > com.androID.tools.build:builder:2.2.3 > org.bouncycastle:bcpkix-jdk15on:1.48 > Could not resolve org.bouncycastle:bcprov-jdk15on:1.48. > Could not get resource 'https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.pom'. > Could not head 'https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.pom'. Received status code 502 from server: Bad Gateway* Try:Run with --stacktrace option to get the stack trace. Run with --info or --deBUG optionto get more log output.* Get more help at https://help.gradle.org
将根据建议here尝试gradle init …而这似乎解决了它.
解决方法 我发现直接使用–verbose flag和cordova命令而不是离子命令在cordova的构建过程中提供调试信息.cordova build androID --verbose
编辑 – >我用Ionic here提出了关于详细的Github请求,它应该是针对Ionic Cli 4修复的.
根据你的日志,
Running command: /opt/IonicProjects/aews_official_rc_1.2.09/platforms/androID/gradlew cdvBuildDeBUG -b /opt/IonicProjects/aews_official_rc_1.2.09/platforms/androID/build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -PandroID.useDeprecatedndk=true
是你的问题.
您必须提供可执行权限
/opt/IonicProjects/aews_official_rc_1.2.09/platforms/androID/build.gradle
和
/opt/IonicProjects/aews_official_rc_1.2.09/platforms/androID/gradlew
使用chmod x
总结以上是内存溢出为你收集整理的离子cordova构建android:错误:产生EACCES全部内容,希望文章能够帮你解决离子cordova构建android:错误:产生EACCES所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)