伙计们。我m work on RN app.
In the dev process everything work fine, the app launched at my device, but when i tried generate APK, i
会卡在下一个错误消息中:
语法错误 D:/Sites/work/CECI/src/stores/AppStore.js:意外 令牌 (12:4)
:app:bundleReleaseJsAndAssets FAILED
构建失败
总时间:43.156秒
失败:生成失败,出现异常。
出了什么问题:任务":app:bundleReleaseJsAndAssets"的执行失败。
进程"命令'cmd'"已完成,退出值为非零 1
尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获取更多日志输出。
进程已完成,退出代码为 1
应用商店.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;
可能是什么问题?
试试 cd android && ./gradlew clean