PhoneGap中文网

 找回密码
 立即注册
查看: 18272|回复: 2

安装环境问题

[复制链接]

1

主题

4

帖子

21

积分

新手上路

Rank: 1

积分
21
发表于 2016-10-31 15:13:15 | 显示全部楼层 |阅读模式
一直按照视频讲的安装系列
cmd 命令 “java”  "javac"  "ant" 都正常的

npm install -g cordova
安装phonegap也是正常的

cordova create hellomobileword com.example.hello "HelloWorld"
创建项目也是正常的(也是创建在D:phoneGap里的,我也是一样的目录结构)

cordova platform add android
问题就是出在这一步(我这边也一样切换到目录里去了的)
到这里就报错了






C:\Users\php001>cordova create hellomobileword com.example.hello "HelloWorld"
Using detached cordova-create
Error: Path already exists and is not empty: C:\Users\php001\hellomobileword

C:\Users\php001>D:

D:\>cd phoneGap

D:\PhoneGap>cordova create hellomobileword com.example.hello "HelloWorld"
Using detached cordova-create
Creating a new cordova project.

D:\PhoneGap>cd hellomobileword

D:\PhoneGap\hellomobileword>cordova platform add android
Adding android project...
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: com.example.hello
        Name: HelloWorld
        Activity: MainActivity
        Android target: android-24
Subproject Path: CordovaLib
Android project created with cordova-android@6.0.0
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the pro
ject
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for android
ANDROID_HOME=D:\PhoneGap\adt\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_101
Subproject Path: CordovaLib
Observed package id 'build-tools;20.0.0' in inconsistent location 'D:\PhoneGap\a
dt\sdk\build-tools\android-4.4W' (Expected 'D:\PhoneGap\adt\sdk\build-tools\20.0
.0')

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 24].
Before building your project, you need to accept the license agreements and comp
lete the installation of the missing components using the Android Studio SDK Man
ager.
Alternatively, to learn how to transfer the license agreements from one workstat
ion to another, go to http://d.android.com/r/studio-ui/export-licenses.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 1.966 secs
Failed to install 'cordova-plugin-whitelist':Error: cmd: Command failed with exi
t code 1
    at ChildProcess.whenDone (D:\PhoneGap\hellomobileword\platforms\android\cord
ova\node_modules\cordova-common\src\superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might n
eed to try adding it again. Error: Error: cmd: Command failed with exit code 1



这是报错的,我也贴出来,求大神帮忙看下,哪里出现错误
sdk环境变量配置是正确的
D:\PhoneGap\adt\sdk\tools;
D:\PhoneGap\adt\sdk\platform-tools;
D:\PhoneGap\adt\eclipse\plugins\org.apache.ant_1.8.3.v201301120609\bin;
D:\nodeJs\

求大神解决!!!!!!
回复

使用道具 举报

4

主题

9

帖子

38

积分

新手上路

Rank: 1

积分
38
发表于 2016-11-2 18:50:43 | 显示全部楼层
这个网站没人
回复 支持 反对

使用道具 举报

0

主题

2

帖子

8

积分

新手上路

Rank: 1

积分
8
发表于 2016-11-9 11:09:28 | 显示全部楼层
我也是这个问题,楼主解决了吗?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

ionic4视频教程

Archiver|手机版|小黑屋| PhoneGap中文网 ( 京ICP备13027796号-1 )  

GMT+8, 2024-3-29 18:23 , Processed in 0.048004 second(s), 34 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表