IT狗

cordova build android Command failed with exit code EACCES

问题:

执行cordova build android 出现输出如下,编译不成功。

ANDROID_HOME=/Users/huangenai/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home

/Applications/Android Studio.app/Contents/gradle/gradle-4.6/bin/gradle: Command failed with exit code EACCES

 

 

探索过程

执行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 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 /Users/huangenai/Desktop/project/push/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 "MyApp" to /Users/huangenai/Desktop/project/push/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 "io.ionic.starter" to /Users/huangenai/Desktop/project/push/platforms/android/src/io/ionic/starter/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".Running command: /usr/libexec/java_homeCommand finished with error code 0: /usr/libexec/java_homeANDROID_HOME=/Users/huangenai/Library/Android/sdkJAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/HomeRunning command: "/Applications/Android Studio.app/Contents/gradle/gradle-4.6/bin/gradle" -p /Users/huangenai/Desktop/project/push/platforms/android wrapper -b /Users/huangenai/Desktop/project/push/platforms/android/wrapper.gradleCommand finished with error code EACCES: /Applications/Android Studio.app/Contents/gradle/gradle-4.6/bin/gradle -p,/Users/huangenai/Desktop/project/push/platforms/android,wrapper,-b,/Users/huangenai/Desktop/project/push/platforms/android/wrapper.gradle/Applications/Android Studio.app/Contents/gradle/gradle-4.6/bin/gradle: Command failed with exit code EACCESError: /Applications/Android Studio.app/Contents/gradle/gradle-4.6/bin/gradle: Command failed with exit code EACCES    at ChildProcess.whenDone (/Users/huangenai/Desktop/project/push/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)    at ChildProcess.emit (events.js:182:13)    at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)    at onErrorNT (internal/child_process.js:407:16)    at process._tickCallback (internal/process/next_tick.js:63:19)

此文由 IT狗 编辑,本网站所发布展示的作品/文章版权归原作者所有,任何商业用途均须联系作者!

相关推荐

评论 暂无评论