Build error on Android
react-native run-android
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/Users/gringo/dev/bitwala/bitwala-app/0.31.0/android/app/src/main/java/com/bitwala/MainApplication.java:36: error: cannot find symbol
new CodePush(this.getResources().getString(R.strings.reactNativeCodePush_androidDeploymentKey), getApplicationContext(), BuildConfig.DEBUG),
^
symbol: variable strings
location: class R
/Users/gringo/dev/bitwala/bitwala-app/0.31.0/android/app/src/main/java/com/bitwala/MainApplication.java:36: error: cannot find symbol
new CodePush(this.getResources().getString(R.strings.reactNativeCodePush_androidDeploymentKey), getApplicationContext(), BuildConfig.DEBUG),
^
symbol: method getResources()
2 errors
:app:compileDebugJavaWithJavac FAILED
Change "this.getResources()" to just "getResources()". Its a bug on React Native's end - https://github.com/facebook/react-native/pull/9381
@geof90, thank you! However, this solved only the first issue, but i'm still getting this:
/MainApplication.java:38: error: cannot find symbol
new CodePush(getResources().getString(R.strings.reactNativeCodePush_androidDeploymentKey), getApplicationContext(), BuildConfig.DEBUG),
^
symbol: variable strings
location: class R
1 error
:app:compileReleaseJavaWithJavac FAILED
Any suggestions how to solve this?
Change "strings" to "string"
This should have been fixed in the latest version of RN https://github.com/facebook/react-native/commit/1168d0db45dc6105a4e88a7749ad5867d37049d2
I have a "similar" error but is coming from the node_mudule/react-native-code-push folder
:react-native-code-push:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/Users/personamac/Documents/Projects/sumoshiftapp/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:22: error: cannot find symbol
import com.facebook.react.modules.core.ChoreographerCompat;
^
symbol: class ChoreographerCompat
"react-native": "0.42.x", "react-native-code-push": "^2.0.1-beta"
gradle:2.2.3
@Rolando-Barbella - hi, react-native-code-push 2.0.1 is not compatible with react-native 0.42x. Please see https://github.com/Microsoft/react-native-code-push/issues/780 for details.