【发布时间】:2017-10-19 16:31:36
【问题描述】:
伙计们。
Im work on RN app.
In the dev process everything work fine, the app launched at my device, but when i tried generate APK, ill 卡住了下一条错误消息:
SyntaxError D:/Sites/work/CECI/src/stores/AppStore.js: Unexpected 令牌 (12:4)
:app:bundleReleaseJsAndAssets 失败
构建失败
总时间:43.156 秒
FAILURE:构建失败并出现异常。
出了什么问题:任务 ':app:bundleReleaseJsAndAssets' 执行失败。
进程 'command 'cmd'' 以非零退出值 1 结束
尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。
进程以退出代码 1 结束
AppStore.js 的开头:
import {action, computed, observable, toJS} from 'mobx';
import {forEach, size, flatMap, sortBy, last} from 'lodash';
import firebase from 'react-native-firebase';
import store from 'rn-object-store';
import moment from 'moment';
const auth = firebase.auth();
const db = firebase.firestore();
class AppStore {
@observable user = null;
@observable auth = {
authUser: null,
authError: null,
loggedIn: null
};
@observable userRef = null;
@observable decisionsRef = null;
@observable quizzesRef = null;
@observable _decisions = {};
@observable _quizzes = {};
@observable activeQuestion = 0;
@observable activeQuiz = null;
@observable activeDecision = null;
@observable reports = {};
所以如果我理解问题的正确行是@observable user = null;
可能是什么问题?
【问题讨论】:
标签: react-native mobx