voximplant / react-native-foreground-service-demo

Demo project for react-native-foreground-service library
MIT License
7 stars 4 forks source link

Fail to run with instructions #24

Open Koxx3 opened 1 year ago

Koxx3 commented 1 year ago

Hello,

I followed the instructions and it doesn't run (I run other react native projects) :


C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\NotificationHelper.java:17: error: package com.facebook.react.bridge does not exist      
import com.facebook.react.bridge.Promise;
                                ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\NotificationHelper.java:18: error: package com.facebook.react.bridge does not exist      
import com.facebook.react.bridge.ReadableMap;
                                ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\NotificationHelper.java:40: error: cannot find symbol
    void createNotificationChannel(ReadableMap channelConfig, Promise promise) {
                                   ^
  symbol:   class ReadableMap
  location: class NotificationHelper
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\NotificationHelper.java:40: error: cannot find symbol
    void createNotificationChannel(ReadableMap channelConfig, Promise promise) {
                                                              ^
  symbol:   class Promise
  location: class NotificationHelper
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:13: error: cannot find symbol
import androidx.annotation.Nullable;
                          ^
  symbol:   class Nullable
  location: package androidx.annotation
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:15: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.Arguments;
                                ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:16: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.Promise;
                                ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:17: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReactApplicationContext;
                                ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:18: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReactContextBaseJavaModule;
                                ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:19: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReactMethod;
                                ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:20: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
                                ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:21: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableMap;
                                ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:22: error: package com.facebook.react.modules.core does not exist
import com.facebook.react.modules.core.DeviceEventManagerModule;
                                      ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:31: error: cannot find symbol
public class VIForegroundServiceModule extends ReactContextBaseJavaModule {
                                               ^
  symbol: class ReactContextBaseJavaModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:40: error: cannot find symbol
    private final ReactApplicationContext reactContext;
                  ^
  symbol:   class ReactApplicationContext
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:43: error: cannot find symbol
    public VIForegroundServiceModule(ReactApplicationContext reactContext) {
                                     ^
  symbol:   class ReactApplicationContext
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:64: error: cannot find symbol
    public void createNotificationChannel(ReadableMap channelConfig, Promise promise) {
                                          ^
  symbol:   class ReadableMap
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:64: error: cannot find symbol
    public void createNotificationChannel(ReadableMap channelConfig, Promise promise) {
                                                                     ^
  symbol:   class Promise
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:73: error: cannot find symbol
    public void startService(ReadableMap notificationConfig, Promise promise) {
                             ^
  symbol:   class ReadableMap
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:73: error: cannot find symbol
    public void startService(ReadableMap notificationConfig, Promise promise) {
                                                             ^
  symbol:   class Promise
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:123: error: cannot find symbol
    public void stopService(Promise promise) {
                            ^
  symbol:   class Promise
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:140: error: cannot find symbol
    private void sendEvent(String eventName, @Nullable WritableMap params) {
                                                       ^
  symbol:   class WritableMap
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:11: error: package com.facebook.react does not exist     
import com.facebook.react.ReactPackage;
                         ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:12: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.NativeModule;
                                ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:13: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReactApplicationContext;
                                ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:14: error: package com.facebook.react.uimanager does not 
exist
import com.facebook.react.uimanager.ViewManager;
                                   ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:15: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.JavaScriptModule;
                                ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:17: error: cannot find symbol
public class VIForegroundServicePackage implements ReactPackage {
                                                   ^
  symbol: class ReactPackage
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:19: error: cannot find symbol
    public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
                                                  ^
  symbol:   class ReactApplicationContext
  location: class VIForegroundServicePackage
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:19: error: cannot find symbol
    public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
                ^
  symbol:   class NativeModule
  location: class VIForegroundServicePackage
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:24: error: cannot find symbol
    public List<Class<? extends JavaScriptModule>> createJSModules() {
                                ^
  symbol:   class JavaScriptModule
  location: class VIForegroundServicePackage
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:29: error: cannot find symbol
    public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
                                                ^
  symbol:   class ReactApplicationContext
  location: class VIForegroundServicePackage
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:29: error: cannot find symbol
    public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
                ^
  symbol:   class ViewManager
  location: class VIForegroundServicePackage
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:48: error: cannot find symbol
    @ReactMethod
     ^
  symbol:   class ReactMethod
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:53: error: cannot find symbol
    @ReactMethod
     ^
  symbol:   class ReactMethod
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:63: error: cannot find symbol
    @ReactMethod
     ^
  symbol:   class ReactMethod
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:72: error: cannot find symbol
    @ReactMethod
     ^
  symbol:   class ReactMethod
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:122: error: cannot find symbol
    @ReactMethod
     ^
  symbol:   class ReactMethod
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:140: error: cannot find symbol
    private void sendEvent(String eventName, @Nullable WritableMap params) {
                                              ^
  symbol:   class Nullable
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:58: error: method does not override or implement a method 
from a supertype
    @Override
    ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:69: error: cannot find symbol
        NotificationHelper.getInstance(getReactApplicationContext()).createNotificationChannel(channelConfig, promise);
                                       ^
  symbol:   method getReactApplicationContext()
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:106: error: cannot find symbol
        Intent intent = new Intent(getReactApplicationContext(), VIForegroundService.class);
                                   ^
  symbol:   method getReactApplicationContext()
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:108: error: cannot find symbol
        intent.putExtra(NOTIFICATION_CONFIG, Arguments.toBundle(notificationConfig));
                                             ^
  symbol:   variable Arguments
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:109: error: cannot find symbol
        ComponentName componentName = getReactApplicationContext().startService(intent);
                                      ^
  symbol:   method getReactApplicationContext()
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:113: error: cannot find symbol
        getReactApplicationContext().registerReceiver(foregroundReceiver, filter);
        ^
  symbol:   method getReactApplicationContext()
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:124: error: cannot find symbol
        Intent intent = new Intent(getReactApplicationContext(), VIForegroundService.class);
                                   ^
  symbol:   method getReactApplicationContext()
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:126: error: cannot find symbol
        boolean stopped = getReactApplicationContext().stopService(intent);
                          ^
  symbol:   method getReactApplicationContext()
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:135: error: cannot find symbol
        WritableMap params = Arguments.createMap();
        ^
  symbol:   class WritableMap
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:135: error: cannot find symbol
        WritableMap params = Arguments.createMap();
                             ^
  symbol:   variable Arguments
  location: class VIForegroundServiceModule
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServiceModule.java:142: error: package DeviceEventManagerModule does not exist
                .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
                                                     ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:18: error: method does not override or implement a method from a supertype
    @Override
    ^
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:20: error: cannot find symbol
        return Arrays.<NativeModule>asList(new VIForegroundServiceModule(reactContext));
                       ^
  symbol:   class NativeModule
  location: class VIForegroundServicePackage
C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\VIForegroundServicePackage.java:28: error: method does not override or implement a method from a supertype
    @Override
    ^
Note: C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@voximplant\react-native-foreground-service\android\src\main\java\com\voximplant\foregroundservice\NotificationHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
53 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':voximplant_react-native-foreground-service: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 10s

    at makeError (C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\execa\index.js:174:9)      
    at C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\execa\index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (C:\Users\Francois\Documents\PlatformIO\Projects\react-native-foreground-service-demo\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.```
gauri-28 commented 1 year ago

same here

GeorgesMainville commented 1 year ago

Same!