-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Version
Tell us which versions you are using:
- react-native-router-flux v3.36.0
- react-native v0.35.0
Expected behaviour
Actual behaviour
When I run react-native run-android
The Console report the error message:
code\react-native-router-flux\Example\android\app\src\main\java\com\example\MainApplication.java:20: 错误: 找不到符号
return BuildConfig.DEBUG;
^
符号: 变量 BuildConfig
1 个错误
:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
Solution
1.open file react-native-router-flux\Example\android\app\src\main\java\com\example\MainApplication.java
2. Add code import com.facebook.react.ReactPackage;
at line 4.
it should be like this:
package com.example;
import android.app.Application;
import android.util.Log;
import com.facebook.react.ReactPackage;
import com.facebook.react.ReactApplication;
Because BuildConfig.DEBUG
defined in
Metadata
Metadata
Assignees
Labels
No labels