【问题标题】:Unable to create build using Gradle无法使用 Gradle 创建构建
【发布时间】:2017-03-21 07:31:12
【问题描述】:

MAC:10.10.5

Java:7

分级:3.4.1

创建了一个包含以下内容的 build.gradle 文件

plugins {
  id "org.openbakery.xcode-plugin" version "0.14.5"
}

xcodebuild {
     target  = 'Hello-Gradle'
     scheme  = 'Debug'
}

在终端中我运行

gradle xcodebuild

错误:

配置根项目“Hello-Gradle”时出现问题。

无法解析配置“:classpath”的所有文件。 无法下载 guava.jar (com.google.guava:guava:16.0.1) 无法获取资源“https://plugins.gradle.org/m2/com/google/guava/guava/16.0.1/guava-16.0.1.jar”。 无法 HEAD 'https://plugins.gradle.org/m2/com/google/guava/guava/16.0.1/guava-16.0.1.jar'。从服务器收到状态码 522:源连接超时

但是,如果我使用 0.11.4 版,我会得到:

错误:任务“:xcodebuild”执行失败。

ProjectScopeServices 中没有 StyledTextOutputFactory 类型的服务可用。

【问题讨论】:

    标签: ios gradle xcode8 xcodebuild


    【解决方案1】:
    plugins {
      id "org.openbakery.xcode-plugin" version "0.14.5"
    }
    
    xcodebuild {
         target = 'Hello-Gradle'
    
    /* If need to differentiate between iOS and android */
         type = 'IOS'             
    
    /* Set ipa file name*/
         ipaFileName = ipaName 
    
     /* if u wish to create archive its necessary to set simulator as FALSE coz for archive we need DEVICE*/
         simulator = false        
    }
    

    构建 IPA 的命令

    $ gradle xcodebuild -q makebuild -q archive -Pipa=Test-QA --info
    

    如果您只想针对您的目标进行构建

    $ gradle build
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-11
      • 1970-01-01
      • 2019-04-12
      • 1970-01-01
      相关资源
      最近更新 更多