I have a problem I simply can't solve:
Problem:
Execution failed for task ':react-native-code-push:compileDebugJavaWithJavac'
Now this only happened after I installed another pakacge, Detox (greybox Testing), before everything worked fine
The error Code:
> Task :react-native-code-push:compileDebugJavaWithJavac FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
183 actionable tasks: 5 executed, 178 up-to-date
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java:14: error: package com.facebook.react.devsupport.interfaces does not exist
import com.facebook.react.devsupport.interfaces.DevSupportManager;
^
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:10: error: cannot find symbol
import com.facebook.react.ReactApplication;
^
symbol: class ReactApplication
location: package com.facebook.react
/Users/user/gifts/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
location: package com.facebook.react.modules.core
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:24: error: cannot find symbol
import com.facebook.react.modules.core.ReactChoreographer;
^
symbol: class ReactChoreographer
location: package com.facebook.react.modules.core
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java:153: error: cannot find symbol
DevSupportManager devSupportManager = instanceManager.getDevSupportManager();
^
symbol: class DevSupportManager
location: class CodePush
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:110: error: cannot find symbol
latestJSBundleLoader = JSBundleLoader.createAssetLoader(getReactApplicationContext(), latestJSBundleFile, false);
^
symbol: method createAssetLoader(ReactApplicationContext,String,boolean)
location: class JSBundleLoader
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:112: error: method createFileLoader in class JSBundleLoader cannot be applied to given types;
latestJSBundleLoader = JSBundleLoader.createFileLoader(latestJSBundleFile);
^
required: Context,String
found: String
reason: actual and formal argument lists differ in length
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:156: error: cannot find symbol
instanceManager.recreateReactContextInBackground();
^
symbol: method recreateReactContextInBackground()
location: variable instanceManager of type ReactInstanceManager
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:208: error: cannot find symbol
ReactApplication reactApplication = (ReactApplication) currentActivity.getApplication();
^
symbol: class ReactApplication
location: class CodePushNativeModule
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:208: error: cannot find symbol
ReactApplication reactApplication = (ReactApplication) currentActivity.getApplication();
^
symbol: class ReactApplication
location: class CodePushNativeModule
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:315: error: package ReactChoreographer does not exist
ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() {
^
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:315: error: package ChoreographerCompat does not exist
ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() {
^
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:315: error: cannot find symbol
ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() {
^
symbol: variable ReactChoreographer
Note: /Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
13 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-code-push:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 20s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java:14: error: package com.facebook.react.devsupport.interfaces does not exist
import com.facebook.react.devsupport.interfaces.DevSupportManager;
^
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:10: error: cannot find symbol
import com.facebook.react.ReactApplication;
^
symbol: class ReactApplication
location: package com.facebook.react
/Users/user/gifts/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
location: package com.facebook.react.modules.core
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:24: error: cannot find symbol
import com.facebook.react.modules.core.ReactChoreographer;
^
symbol: class ReactChoreographer
location: package com.facebook.react.modules.core
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java:153: error: cannot find symbol
DevSupportManager devSupportManager = instanceManager.getDevSupportManager();
^
symbol: class DevSupportManager
location: class CodePush
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:110: error: cannot find symbol
latestJSBundleLoader = JSBundleLoader.createAssetLoader(getReactApplicationContext(), latestJSBundleFile, false);
^
symbol: method createAssetLoader(ReactApplicationContext,String,boolean)
location: class JSBundleLoader
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:112: error: method createFileLoader in class JSBundleLoader cannot be applied to given types;
latestJSBundleLoader = JSBundleLoader.createFileLoader(latestJSBundleFile);
^
required: Context,String
found: String
reason: actual and formal argument lists differ in length
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:156: error: cannot find symbol
instanceManager.recreateReactContextInBackground();
^
symbol: method recreateReactContextInBackground()
location: variable instanceManager of type ReactInstanceManager
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:208: error: cannot find symbol
ReactApplication reactApplication = (ReactApplication) currentActivity.getApplication();
^
symbol: class ReactApplication
location: class CodePushNativeModule
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:208: error: cannot find symbol
ReactApplication reactApplication = (ReactApplication) currentActivity.getApplication();
^
symbol: class ReactApplication
location: class CodePushNativeModule
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:315: error: package ReactChoreographer does not exist
ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() {
^
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:315: error: package ChoreographerCompat does not exist
ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() {
^
/Users/user/gifts/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:315: error: cannot find symbol
ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, n
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…