在新的XCode5中构建我的项目时,我收到以下警告:Pods-App被拒绝为"libPods-App.a"的隐式依赖项,因为它的体系结构'i386'不包含所有必需的体系结构'x86_64'.
为什么这段代码不起作用?
func function (param1 : Int, param2 : Int) -> Int {
return $0 + $1
}
Run Code Online (Sandbox Code Playgroud)
它会产生错误:
错误:匿名闭包参数未包含在闭包中
我正在尝试设置我的CI并且我创建了一个免费样式的作业,但它在git clone步骤中失败了,下面是这个日志.我使用ssh键正确配置了计算机,但我找不到任何问题.
Using strategy: Default
Fetching changes from 1 remote Git repository
Commencing build of Revision 9560773cf0e8545f98c6700c44fd2f9ae31af904 (origin/master)
Checking out Revision 9560773cf0e8545f98c6700c44fd2f9ae31af904 (origin/master)
FATAL: Could not checkout 9560773cf0e8545f98c6700c44fd2f9ae31af904
hudson.plugins.git.GitException: Could not checkout 9560773cf0e8545f98c6700c44fd2f9ae31af904
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.checkout(JGitAPIImpl.java:68)
at hudson.plugins.git.GitAPI.checkout(GitAPI.java:208)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1261)
at hudson.plugins.git.GitSCM.access$1200(GitSCM.java:57)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1220)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1196)
at hudson.FilePath.act(FilePath.java:865)
at hudson.FilePath.act(FilePath.java:838)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1196)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1353)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:683)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:588)
at hudson.model.Run.execute(Run.java:1567)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: org.eclipse.jgit.api.errors.CheckoutConflictException: Checkout conflict with files:
Heatmaps.framework/Headers/Heatmaps.h
Heatmaps.framework/Resources/Info.plist
Heatmaps.framework/Versions/Current/Headers
Heatmaps.framework/Versions/Current/Headers/Heatmaps.h
Heatmaps.framework/Versions/Current/Heatmaps
Heatmaps.framework/Versions/Current/Resources …
Run Code Online (Sandbox Code Playgroud) 我正在尝试执行以下代码将元组数组转换为字典但我收到编译错误说:
类型'[String:String]'的不可变值仅包含名为'updateValue'的变异成员
var array = [("key0", "value0"), ("key1", "value1")]
var initial = [String: String]()
var final = array.reduce(initial) { (dictionary, tuple) in
dictionary.updateValue(tuple.0, forKey: tuple.1)
return dictionary
}
Run Code Online (Sandbox Code Playgroud)
为什么如果initial被声明为var?它与reduce 的签名上的@noescape有关吗?
func reduce<U>(initial: U, combine: @noescape (U, T) -> U) -> U
Run Code Online (Sandbox Code Playgroud) 我正在按照说明手动安装 GoogleMaps 和 GooglePlaces SDKs (v3.0.3),在拖动框架、添加到项目目标并复制捆绑资源后,项目成功构建但无法安装在模拟器上,如下所示错误:
Failed to load Info.plist from bundle at path
/Users/raphaeloliveira/Library/Developer/CoreSimulator/
Devices/DF9C1649-ED71-47D9-9E36-28F53FF59B24/data/Library/Caches/
com.apple.mobile.installd.staging/
temp.xSOM90/extracted/MyApp.app/Frameworks/GoogleMapsBase.framework
Run Code Online (Sandbox Code Playgroud)
下载的 zip 文件确实不包含框架文件夹中的 plist,这很奇怪。我注意到 GooglePlaces SDK 的捆绑资源确实包含一个 Info.plist 但这似乎还不够,即使在.framework/
. 有没有人遇到过这种情况并找到了解决方案或解决方法?
PS:清理、删除派生数据、重新启动模拟器和 XCode 解决方法不起作用。
我正在使用Robotium测试我的Android应用程序,而我正面临一个间歇性问题.我的应用程序以SigninActivity开始,允许用户登录,然后将其定向到第二个活动,该活动具有在向Web服务器发出请求后填充的列表.
第一个问题是:由于我的所有活动只能在用户登录后才能访问,因此我需要从登录屏幕开始每个活动的每个测试.所以我正在做的是每个活动测试类,我继承它
ActivityInstrumentationTestCase2<SigninActivity>
Run Code Online (Sandbox Code Playgroud)
在setUp方法中,我在用户中登录.这是正确的方法吗?
第二个问题:我想测试在向Web服务器发出请求后填充的第二个活动中的列表数据.如上所述,在我的设置方法中,我登录用户,我使用
solo.waitForActivity(SecondActivity.class, BIG_TIMEOUT)
solo.waitForView(ListView.class)
Run Code Online (Sandbox Code Playgroud)
保证第二项活动和清单存在.问题是,即使通过这种验证我经常得到
junit.framework.AssertionFailedError: Can not click on line number 2 as there are only 0 lines available
Run Code Online (Sandbox Code Playgroud) 我正在读这篇关于进口的帖子,我有一个问题.默认情况下,prefix.pch文件中的#import是否会减慢编译时间?我应该删除它并仅在必要时导入吗?
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
Run Code Online (Sandbox Code Playgroud) 经过多次尝试,我没有想到如何通过终端运行工作区内的项目进行单元测试.我试图创建一个新的Scheme并运行该脚本,该脚本构建但不运行任何测试:
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer/
xcodebuild -workspace MyProject.xcworkspace\
-scheme MyProjectLogicTests\
-sdk iphonesimulator\
-configuration Debug\
ONLY_ACTIVE_ARCH=NO\
TEST_AFTER_BUILD=YES\
RUN_APPLICATION_TESTS_WITH_IOS_SIM=YES\
clean build
Run Code Online (Sandbox Code Playgroud) 我正在尝试为Jenkins 配置android模拟器插件,我很难弄清楚插件无法找到Android SDK的原因.
首先,克隆项目后Jenkins总是输出:
[android] No Android SDK found; let's install it automatically...
[android] Going to install required Android SDK components...
[android] Installing the 'platform-tool,tool' SDK component(s)...
$ /var/lib/jenkins/tools/android-sdk/tools/android update sdk -u -a -t platform-tool,tool
Run Code Online (Sandbox Code Playgroud)
之后,它失败了,因为插件可能不知道如何回答许可协议.
Do you accept the license 'android-sdk-license-bcbbd656' [y/n]:
Unknown response ''.
Do you accept the license 'android-sdk-license-bcbbd656' [y/n]:
Unknown response ''.
Max number of retries exceeded. Rejecting 'android-sdk-license-bcbbd656'
Run Code Online (Sandbox Code Playgroud)
所以我只是复制命令我自己并安装了所有的东西.输出保持不变,未找到Android SDK.我试图chown和chmod 755文件夹,以确保Jenkins可以访问它,并再次失败.
我检查了Jenkins配置,我可以明确地告诉Jenkins android SDK在哪里,但知道它失败并出现另一个错误:我用/ var/lib/jenkins/tools/android-sdk /填充了Android SDK根目录但显示必需找不到工具(adb等). …
我在故事板中有两个UIViewControllers(A和B).A视图控制器具有属性
@property (nonatomic, retain) IBOutlet UIViewController *viewController;
Run Code Online (Sandbox Code Playgroud)
我想通过故事板链接到B.
插座显示在故事板菜单中的IBOutlets部分下,但我无法链接.为什么我要这样做但我需要它可能看起来很奇怪.有人知道怎么做吗?
我刚刚开始开发IOS Swift
,现在我被困在一件事上.我想要的是将字符串值从一个传递ViewController
给另一个.
第一视图控制器
// on TableCell Click
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
CommonFunctions.setDefaults("a", value: arr[indexPath.row])
let viewController = SecondView(passedData:arr[indexPath.row])
self.presentViewController(viewController, animated: true, completion: nil)
}
Run Code Online (Sandbox Code Playgroud)
第二个ViewController
var test:String
init(passedData:String){
self.test = passedData
super.init(nibName: nil, bundle: nil)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
print(CommonFunctions.getDefaults("a"))
}
Run Code Online (Sandbox Code Playgroud)
我成功地获得了第二个字符串,ViewController
但问题是我得到了黑屏.
ios ×4
jenkins ×3
swift ×3
android ×1
cocoapods ×1
command-line ×1
compilation ×1
dictionary ×1
git ×1
iboutlet ×1
objective-c ×1
pch ×1
reduce ×1
robotium ×1
storyboard ×1
terminal ×1
xcode ×1
xcode4.6 ×1
xcode5 ×1