Closed SpQuyt closed 6 years ago
I am struggling with the same problem as well. Is there somebody to help?
Well I stopped using expo and then I used react-native init, then react-native run-android. And it worked. I don't know why but the most suitable answer for this is that this library cannot be used in expo?
I ran into the same problem with the react-native init then react-native run-android method. The relative path links are correct too. The package versions that i am using:
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-tensorflow": "0.1.8"
I accidentally forgot to link the package.
$ react-native link react-native-tensorflow
maybe you too.
Good part of the day!
By the way, I am using react native init
with react-native run-ios.
I am pretty sure that I have linked all packages with react native link
as well, as I have responding message on successful linkage as follows:
rnpm-install info Platform 'ios' module react-native-tensorflow is already linked
rnpm-install info Platform 'android' module react-native-tensorflow is already linked
Pod is already installed and I have absolutely copied and past example content for checking purposes. However, still I have the issue with:
TypeError: undefined is not an object(evaluating 'RNImageRecognition.init-ImagerRecognizer')
Any help, hint, advise is appreciated!
UPDATE
I guess the problem is with cocoa pods. I have installed its using following commands:
pod remove repo master
pod setup
pod install
What could I do?
sorry for late reply - @SpQuyt it is indeed not possible to use native modules with expo, thus this lib can't be used with it
@reneweb thanks for your reply. I have changed from expo to react-native init and it's all good.
When trying to integrate a pretrained tensorflow model with expo (react-native), the following error occurs within these lines:
Which generates the following error
I have been trying to find the reason why this is not working but I cannot find a definite solution. The relative paths linking to the assets are correct and the extensions are present in the app.json. Furthermore the model is trained using the tensorflow api which should make it compatible with the react-native implementation.
I observed that after running
The code changed immediately to "catch(err)" branch, which means it could not load the model and labels?
I am using expo SDK version 28.0.0, Expo XDE and react-native-tensorflow version ^0.1.8