我正在尝试创建一个NSTimer
in Swift
但我遇到了一些麻烦.
NSTimer(timeInterval: 1, target: self, selector: test(), userInfo: nil, repeats: true)
Run Code Online (Sandbox Code Playgroud)
test()
是同一个类中的函数.
我在编辑器中收到错误:
找不到接受提供的参数的'init'的重载
当我改变selector: test()
到selector: nil
错误消失.
我试过了:
selector: test()
selector: test
selector: Selector(test())
但没有任何作用,我在参考文献中找不到解决方案.
加载脚本时,我收到此错误:
TypeError:'undefined'不是函数(评估'$(document)')
我不知道是什么导致了它或它甚至意味着什么.
在萤火虫中,我得到了这个:
$不是一个功能
当rake
我运行任何任务时,我得到:
NoMethodError:未定义的方法`last_comment'for
之后bundle update
推出了新版本的rake版本11.0.1
.
$ grep rake Gemfile.lock
rake
rake (>= 0.8.7)
rake (11.0.1)
rake
$ bundle update
$ bundle exec rake db:drop # any rake task
Run Code Online (Sandbox Code Playgroud)
NoMethodError:#Rake :: Application:0x007ff0cf37be38>未定义的方法`last_comment'
版本
当我rake db:seed
在我的Rails
应用程序中运行时,我收到此错误:
US-ASCII中的无效字节序列(参数错误)
我只是添加science_majors
到我的种子文件,现在当我运行rake db:seed
它给我这个错误:
无效的字节序列错误
为什么会这样,我该如何解决?
seed.rb的一部分
@college = College.find_or_create_by_name!('University of Pittsburgh')
if @college.update_attributes(
url: 'university-of-pittsburgh',
public: 'Public',
years: '4-year',
category: 'National University',
calendar: 'Semester',
location: 'Pittsburgh, PA',
setting: 'Large City (250-500k)',
retention: '90',
majors: 'business/marketing: 15%|social sciences: 14%|health professions: 11%|english: 10%|engineering: 9%|psychology: 8%|biology: 7%|history: 5%',
scholarships_link: 'http://www.oafa.pitt.edu/universityschlrs.aspx',
map: '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=university+of+pittsburgh&aq=&sll=40.444261,-79.970448&sspn=0.142165,0.251656&ie=UTF8&hq=university+of+pittsburgh&t=m&ll=40.443486,-79.958245&spn=0.010798,0.021038&output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=university+of+pittsburgh&aq=&sll=40.431368,-79.9805&sspn=0.142165,0.251656&ie=UTF8&hq=university+of+pittsburgh&t=m&ll=40.443486,-79.958245&spn=0.010798,0.021038" style="color:#0000FF;text-align:left">View Larger Map</a></small>',
street_view: '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" …
Run Code Online (Sandbox Code Playgroud) 这是简短的版本:
我跑的时候
pod install
Run Code Online (Sandbox Code Playgroud)
在我得到的Xcode项目中
[!] Pod :: Executable pull error:无法打开.git/FETCH_HEAD:权限被拒绝
如果我跑
sudo pod install
Run Code Online (Sandbox Code Playgroud)
我没有得到任何错误,但是我安装的文件是root所有并且无法编译,我必须将chown
这些文件发送给普通用户才能使用Xcode编译器.
我正在运行Lion OSX.
我使用安装了cocoaPods
sudo gem install cocoaPods
Run Code Online (Sandbox Code Playgroud)
我不得不使用sudo
因为没有它我得到了
错误:执行gem时...(Gem :: FilePermissionError)
您没有写入/Library/Ruby/Gems/1.8目录的权限.
所以现在我有一个root安装版本的cocoaPods下载了root拥有的Xcode库.
是以sudo
正确的方式安装cocoaPods吗?
如果正常,有没有办法解决pod安装问题?
我试图在Mavericks上的Xcode 5中设置持续集成.如果我有一个机器人做一个新的干净项目构建,它完成没有错误.如果我让机器人在我的实际项目上进行构建,我会收到以下错误:
未找到匹配的配置文件:您的构建设置使用UUID"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"指定配置文件,但是,未找到此类配置文件.CodeSign错误:SDK"iOS 7.0"中的产品类型"应用"需要代码签名
如果我在服务器计算机上提取最新的源代码并在服务器上构建/存档它,它会按预期工作.所有预期的证书和公钥都包含在钥匙串中.我试图更新项目中的所有配置文件设置,并构建目标方案点.有没有人有任何想法如何解决此错误?
编辑:破解打开项目文件并查看UUID后,从我可以告诉UUID的配置文件中找不到它确实存在.也许这是构建无法访问配置文件或钥匙串证书的某种权限问题?
我对使用终端完全不熟悉,在尝试使用brew
安装一些东西时,我做了一些事情PATH
.现在,如果我告诉它做某事它总会回来
-bash:blah:找不到命令.
有没有办法重置一些东西来解决这个问题?我该怎么办?
使用iOS9应用程序openURL:sourceApplication:不推荐使用注释
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool {
return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
}
Run Code Online (Sandbox Code Playgroud)
所以现在我们应该使用;
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {}
Run Code Online (Sandbox Code Playgroud)
FBSDKApplicationDelegate为sourceApplication参数设置的内容(String)
我在我的Mac OS X Yosemite
控制台中看到了这个:
AppleEvents: Send port for process has no send right,
port=( port:30743/0x7817 rcv:1,send:0,d:0 limit:5)
(findOrCreate()/AEMachUtils.cp #526)
com.apple.NSXPCConnection.user.1963
Run Code Online (Sandbox Code Playgroud)
我正在开发一个XPC服务,它处理来自Mac OS App
运行在同一个客户端上的客户端的进程间通信Mac
.
显然错误来自:
(findOrCreate()
方法/AEMachUtils.cp
#526(Line#?)
该XPC
服务接收请求并调用正确的方法来处理这个请求,但每次我看到上面的警告.@protocol是:
- (oneway void)doService:(NSString *)aString withReply:(void (^)(NSString *))reply;
Run Code Online (Sandbox Code Playgroud)
我再也没有看到回复NSString
.- (单程void
)是否与此有关?该错误出现在服务的Console
跟踪stderr
中XPC
.错误是说我需要赋予发件人进程权限吗?如果是这样的话?
在此先感谢您的考虑.此致,AK
当我构建我的cordova
项目时,我收到一条警告消息:
缺少文件:/home/vijay/workspace/Repos_temp/QuickTraq_Android/plugins/nl.x-services.plugins.toast/plugin.xml
缺少文件:/home/vijay/workspace/Repos_temp/QuickTraq_Android/plugins/cordova-plugin-device-rotation-vector/plugin.xml
当我添加插件或删除插件时会发生这种情况.
当我添加插件或构建项目但当我删除插件错误时,这就像发出警告一样
错误:ENOENT,在Object.fs.openSync上没有这样的文件或目录'/home/vijay/workspace/Repos_temp/QuickTraq_Android/plugins/com.grumpysailor.cordova-plugin-device-rotation-vector/plugin.xml'(fs. js:439:18)在Object.fs.read.exports.parseElementtreeSync的Object.fs.readFileSync(fs.js:290:15)处(/ usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/util) /xml-helpers.js:121:27)在/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/dependencies.js:56:35在Array.forEach(native)at runUninstallPlatform(/ usr/local/lib)中的Object.module.exports.package.generateDependencyInfo(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/dependencies.js:53:45) /node_modules/cordova/node_modules/cordova-lib/src/plugman/uninstall.js:218:53)在Function.module.exports.uninstallPlatform(/ usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src) /plugman/uninstall.js:81:12)/ usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/c ordova/plugin.js:205:58 at _fulfilled(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
我的插件删除失败..有没有办法解决这个问题?
android phonegap-plugins cordova phonegap-build cordova-plugins