react-native-draw-overlay icon indicating copy to clipboard operation
react-native-draw-overlay copied to clipboard

error: package com.reactlibrary does not exist

Open williamsilveira45 opened this issue 6 years ago • 2 comments

Hii man!

Thanks for this package! but I have manually install and appears this issues; error: package com.reactlibrary does not exist

williamsilveira45 avatar Apr 30 '20 16:04 williamsilveira45

hi, I have the same problem. I solve these issues with changing the import

from this import com.reactlibrary.RNDrawOverlayPackage;

change to this import com.toyberman.drawOverlay.RNDrawOverlayPackage;

dananw avatar Jul 26 '20 15:07 dananw

my full source code on MainActivity.java

package com.app.name;

// import com.reactlibrary.RNDrawOverlayPackage;

/** add this */
import com.toyberman.drawOverlay.RNDrawOverlayPackage;
import java.util.Arrays;
import java.util.List;
/**until  this */

import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;

/** add this */
import com.facebook.react.ReactPackage;
/** until this */

import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;




public class MainActivity extends ReactActivity {

  /**
   * Returns the name of the main component registered from JavaScript. This is used to schedule
   * rendering of the component.
   */
  @Override
  protected String getMainComponentName() {
    return "AppName";
  }

/** add this */
  protected List<ReactPackage> getPackages() {
    return Arrays.asList(
      new RNDrawOverlayPackage()
    );
  }
/**until this */

  @Override
  protected ReactActivityDelegate createReactActivityDelegate() {
    return new ReactActivityDelegate(this, getMainComponentName()) {
      @Override
      protected ReactRootView createRootView() {
       return new RNGestureHandlerEnabledRootView(MainActivity.this);
      }
    };
  }
}

dananw avatar Jul 26 '20 15:07 dananw