Skip to main content
Answer

in android we are getting error

  • July 27, 2021
  • 1 reply
  • 504 views

Forum|alt.badge.img+4

i am using react native in ios it is working fine ,but in android it is not working .could any one help me.

but in android other react iap is working 

 

componentDidMount() {

      Purchases.setDebugLogsEnabled(true);
      Purchases.setup("****************************");

}

================

version i have used

==============
  "react-native": "~0.63.4",
  "react-native-purchases": "^4.3.0",
============

error i am getting ,showing it s not connecting with RC but it is working with IAP other pacages

==================

null is not an object (evaluating 'RNPurchases.setDebugLogsEnabled')
at node_modules/react-native-purchases/dist/purchases.js:335:19 in Purchases.setDebugLogsEnabled
at App.js:23:4 in componentDidMount
at App.js:21:2 in componentDidMount
at [native code]:null in commitRootImpl
at [native code]:null in performSyncWorkOnRoot
at node_modules/react-native/Libraries/ReactNative/renderApplication.js:54:4 in renderApplication
at node_modules/react-native/Libraries/ReactNative/AppRegistry.js:117:25 in runnables.appKey.run
at node_modules/react-native/Libraries/ReactNative/AppRegistry.js:202:4 in runApplication
at [native code]:null in callFunctionReturnFlushedQueue

--

[Edited]: RC Staff has edited this post to redact additional information.

Best answer by tina

Hi @Michele Laurelli,

For the null is not an object (evaluating 'RNPurchases.setDebugLogsEnabled') in the stack trace, it looks like the SDK wasn’t installed correctly. Can you try removing the package and installing it again?

You can also try building the sample app to confirm it’s not a problem with any code on your side. As well as double checking the install guide.

This post has been closed for comments

1 reply

tina
RevenueCat Staff
Forum|alt.badge.img+10
  • RevenueCat Staff
  • Answer
  • July 27, 2021

Hi @Michele Laurelli,

For the null is not an object (evaluating 'RNPurchases.setDebugLogsEnabled') in the stack trace, it looks like the SDK wasn’t installed correctly. Can you try removing the package and installing it again?

You can also try building the sample app to confirm it’s not a problem with any code on your side. As well as double checking the install guide.