Closed dvvtms closed 5 years ago
Simply remove react-native-perspective-image-cropper
from your android dependencies. :)
Android is not supported yet.
thnx, thats nice :)
I'm adding react-native-perspective-image-cropper
to my Android app as react-native-document-scanner
doesn't support Android, and this project is mentioned from the react-native-document-scanner
's README.md file and I'm facing this issue when compiling my Android app.
Obviously @Michaelvilleneuve your solution isn't for me 😄.
Can you please let me know how can I fix this?
So based on the Java ReactPackage, removing the offending method seem to fix this issue.
The final file looks like the following :
package com.reactlibrary;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.bridge.JavaScriptModule;
public class RNCustomCropPackage implements ReactPackage {
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
return Arrays.<NativeModule>asList(new RNCustomCropModule(reactContext));
}
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Collections.emptyList();
}
}
@Michaelvilleneuve not sure if you need to manage versions or anything, otherwise I can open a PR if you'd like to. Let me know.
@zedtux This lib does not support android either 😞
Sorry @Michaelvilleneuve but I'm not following you...
By "This lib" do you mean react-native-perspective-image-cropper
?
If it is, then why is "this lib" suggested from the react-native-document-scanner
documentation?
react-native-perspective-image-cropper
is working well on my Android phone BTW.
The UI of this lib will work fine on both platforms, but if you take a look at the JAVA code you won't find any exported method in this lib.
The actual crop method won't work on your Android device. That is why I am saying that it does not support Android.
Also if you read the readme of the other lib, the document scanner, you will notice that it does not support Android either 😕
Okay, thank you @Michaelvilleneuve for the clarifications. Do you know any RN lib, Android compatible, which could achieve the same as react-native-document-scanner
or react-native-perspective-image-cropper
?
Nope, I wish someone could help me implement them both. In my case, I only needed iOS so I only developped the iOS version of both
Okay, thank you for your replies 👍
Fixed by 1bd80f80e919d6c00b6be9b832a1f1625495aba2 cropper is now available on both Android and iOS
Hy, the following error happened to me after rnpic install & link & build:
any quickfix? :) thank you