有没有办法versionName从build.gradleAndroid项目的文件中读取值以在bash中使用它?
更准确地说:如何从文件中读取该值并在Travis-CI脚本中使用它?我会像使用它一样
# ANDROID_VERSION=???
export GIT_TAG=build-$ANDROID_VERSION
Run Code Online (Sandbox Code Playgroud)
我设置了一个Travis-CI,就像这篇文章中描述的那样/sf/answers/1976149801/.
我的build.gradle:http://pastebin.com/uiJ0LCSk
我无法让反应本地人this.setState();工作.
当我运行该onUpdate方法时,我可以看到返回正确的JSON对象.
问题是当setState调用函数时没有任何反应,方法失败.它下面不再执行任何代码.它也不会在setState函数后重新渲染组件.
这是我的组件代码如下:
var App = React.createClass({
getInitialState: function() {
return {
view: Login,
menu: false,
}
},
componentDidMount: function() {
var self = this;
},
onUpdate: function(val){
// val is verified as an object here when I log to console
this.setState(val);
// nothing runs here. The above line errors out the function
},
render: function () {
if(this.state.view == 'Home'){
this.refs.sideMenu.frontView = Home;
return (
<View style={styles.container} >
{sideMenu}
</View> …Run Code Online (Sandbox Code Playgroud) 我有一些PHP下载脚本.最后两行是这些:
header("Content-Length: ". @filesize($filename));
@readfile($filename);
Run Code Online (Sandbox Code Playgroud)
NetBeans在两行"错误控制操作符未使用"中发出警告.我可以忽略这个警告,或者我该如何解决?