Eugene Alitz
Eugene Alitz

Reputation: 222

React Native - APK generation failed

guys. 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 stuck with next error message:

SyntaxError D:/Sites/work/CECI/src/stores/AppStore.js: Unexpected token (12:4)

:app:bundleReleaseJsAndAssets FAILED

BUILD FAILED

Total time: 43.156 secs

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:bundleReleaseJsAndAssets'.

    Process 'command 'cmd'' finished with non-zero exit value 1

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Process finished with exit code 1

Beginning of 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 = {};

So if i understand right row with issue is @observable user = null; What can be a problem?

Upvotes: 2

Views: 6036

Answers (1)

mohammad chughtai
mohammad chughtai

Reputation: 1964

Try cd android && ./gradlew clean

Upvotes: 2

Related Questions