我在使用facebook unity sdk为android编译统一时遇到此错误(如果我删除它编译好的sdk):
Failed to compile resources with the following parameters:
-bootclasspath "/Users/ines/Development/android-sdk-macosx/platforms/android-21/android.jar" -d "/Users/ines/Documents/Game/Temp/StagingArea/bin/classes" -source 1.6 -target 1.6 -encoding UTF-8 "com/RPS/Game/R.java" "com/facebook/android/R.java"
warning: java/lang/Object.class(java/lang:Object.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
1 warning
UnityEditor.HostView:OnGUI()
Run Code Online (Sandbox Code Playgroud)
我不明白为什么会这样.我在OSX 10.9.5上运行Unity 4.6,我安装了最新版本的Java以及android skd.
谁能帮我?
我正在尝试forwardRef
在也在使用的功能组件中使用react-redux
。我的组件看起来像这样:
const InfiniteTable = ({
columns,
url,
data,
stateKey,
loading,
loadMore,
fetchData,
customRecordParams,
...rest
}, ref) => {
const [start, setStart] = useState(0);
const tableRef = React.createRef();
console.log(rest);
let dataSource = data;
if (customRecordParams) dataSource = _.map(dataSource, customRecordParams);
if (dataSource.length > FETCH_LIMIT)
dataSource = _.slice(dataSource, 0, start + FETCH_LIMIT);
useEffect(() => setupScroll(setStart, tableRef), []);
useEffect(() => {
if (loadMore) fetchData(url, stateKey, { start });
}, [start, loadMore]);
useImperativeHandle(ref, () => ({
handleSearch: term => console.log(term),
handleReset: …
Run Code Online (Sandbox Code Playgroud) 我正在使用 react-router (v.4.3.1) 来渲染我的应用程序的主要部分,我在左侧有一个带有菜单的抽屉。当在应用程序标题中切换按钮时,我正在更改折叠变量的状态,以便组件重新渲染 css。我的问题是这个变量需要存储在渲染所有我Route
的组件上,当组件更新时Route
正在卸载和安装它的组件。
我已经尝试向key
我提供一个,Route
但它不起作用。
我的代码看起来像这样,这个组件的父级是正在更新的重新渲染我的Main
组件的父级:
class Main extends Component {
constructor(props) {
super(props);
this.observer = ReactObserver();
}
getLayoutStyle = () => {
const { isMobile, collapsed } = this.props;
if (!isMobile) {
return {
paddingLeft: collapsed ? '80px' : '256px',
};
}
return null;
};
render() {
const RouteWithProps = (({index, path, exact, strict, component: Component, location, ...rest}) =>
<Route path={path}
exact={exact}
strict={strict}
location={location}
render={(props) => <Component key={"route-" …
Run Code Online (Sandbox Code Playgroud)