react-native-draw-overlay
react-native-draw-overlay copied to clipboard
error: package com.reactlibrary does not exist
Hii man!
Thanks for this package! but I have manually install and appears this issues; error: package com.reactlibrary does not exist
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;
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);
}
};
}
}