react-native-code-push icon indicating copy to clipboard operation
react-native-code-push copied to clipboard

Build error on Android

Open yogiben opened this issue 10 years ago • 6 comments

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

yogiben avatar Aug 19 '16 15:08 yogiben

Change "this.getResources()" to just "getResources()". Its a bug on React Native's end - https://github.com/facebook/react-native/pull/9381

geof90 avatar Aug 19 '16 15:08 geof90

@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?

kulikalov avatar Sep 29 '16 12:09 kulikalov

Change "strings" to "string"

geof90 avatar Sep 29 '16 16:09 geof90

This should have been fixed in the latest version of RN https://github.com/facebook/react-native/commit/1168d0db45dc6105a4e88a7749ad5867d37049d2

geof90 avatar Sep 29 '16 16:09 geof90

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 avatar Apr 05 '17 11:04 Rolando-Barbella

@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.

max-mironov avatar Apr 05 '17 11:04 max-mironov