风影 发表于 2015-7-22 10:16:25

ionic build项目有问题 求大神解决

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:1.0.0+.
   Required by:
         :android:unspecified
      > Failed to list versions for com.android.tools.build:gradle.
         > Unable to load Maven meta-data from https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml.
            > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml'.
               > peer not authenticated

* Try:

BUILD FAILED

Total time: 1.433 secs
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

D:\webstorm_workspace\ACJ\platforms\android\cordova\node_modules\q\q.js:126
                  throw e;
                        ^
Error code 1 for command: cmd with args: /s /c "D:\webstorm_workspace\ACJ\platforms\android\gradlew cdvBuildDebug -b D:\webstorm_workspace\ACJ\platforms\android\build.gradle -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
    at ChildProcess.whenDone (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)


这是报的错,检查一下platform发现缺少ant-build文件和ant-gen文件,不知道是不是这个问题,求大神们帮忙看一下,困扰了两天了

admin 发表于 2015-7-23 22:08:47

1.确定环境安装没有问题

2.用cordova 创建试试看看可以不,如果可以那么重新安装ionic

如果不可以说明 cordova环境可能就有问题


3.如果以前可以的话现在不可以那么检查代码

风影 发表于 2015-7-24 09:29:10

谢谢,我去试试

风影 发表于 2015-7-31 16:13:49

环境都没问题..就是build不上啊
页: [1]
查看完整版本: ionic build项目有问题 求大神解决