What you expected to happen?
What actually happens?
I cannot install the app on my Samsung S8 or on the android emulator. I get an error saying the package does not exist.
STACK TRACE AND/OR SCREENSHOTS
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
C:\Stock Api\stock_app\android\app\src\main\java\com\stock_app\MainApplication.java:6: error: package com.microsoft.codepush.react does not exist
import com.microsoft.codepush.react.CodePush;
^
C:\Stock Api\stock_app\android\app\src\main\java\com\stock_app\MainApplication.java:23: error: cannot find symbol
return CodePush.getJSBundleFile();
^
symbol: variable CodePush
C:\Stock Api\stock_app\android\app\src\main\java\com\stock_app\MainApplication.java:35: error: cannot find symbol
new CodePush(null, getApplicationContext(), BuildConfig.DEBUG),
^
symbol: class CodePush
3 errors
:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
I tried editing the MainApplication.java to use MainApplication.this but with no luck
I tried again using :
"react": "16.3.1",
"react-native": "0.55.2",
"react-native-code-push": "5.3.2"
I found that the react-native link react-native-code-push command does not add the following line to the build.gradle file :
dependencies {
+ compile project(':react-native-code-push')
compile fileTree(dir: "libs", include: ["*.jar"])
Maybe somehow could check why this line is not added with the react-native command
Hi @Adwich,
Thanks for reporting!
I've tested usual scenario and haven't found any issue. Your issue line(compile project(':react-native-code-push')) was added.
Could you please share your command and actions which you used for setup?
Also, this is setup documentation which can help you setup successfully: https://github.com/Microsoft/react-native-code-push#getting-started
Thanks,
Alexander
Hi @alexandergoncharov ,
My project was started with react-native init. All I did was :
npm i --save react-native-code-push
react-native link react-native-code-push
I followed the doc all along. But it is working for me. It might not be a bug. Thank you for help
@Adwich , Could you please try to make one more project just for test with CodePush setup?
And if this issue is reproduced then could you please share this project with reproducing issue?
Because I can't repro this and I'm not sure what is the reason of issue. Your test project will help me to investigate it.
Thanks,
Alexander
Hi @Adwich,
I'll close this issue for now as I didn't hear answer form you in a while. Please feel free to reopen it if you will have any questions.
Thanks,
Alexander
Most helpful comment
I tried again using :
I found that the
react-native link react-native-code-pushcommand does not add the following line to thebuild.gradlefile :Maybe somehow could check why this line is not added with the react-native command