Library working fine in the iOS, but getting error in Android
Undefined is not an object (evaluating 'StripeModule.init').
Using
Android Studio 3.0
react-native-cli: 2.0.1
react-native: 0.50.4
I followed this tutorial
https://medium.com/code-well-live-forever/credit-cards-with-stripe-and-react-native-1bfe9afcbb42
Please let me know what can be updated to solve the same?
@gopaldevra Hi, have you linked tipsi-stripe?
Read the following guide and check that's everything is fine https://github.com/tipsi/tipsi-stripe#android-1
Hi @isnifer thanks for response, I used this command to link against iOS and Android, but not using the manual setup, I think we don't need to do the manual work if we hit same command.
react-native link tipsi-stripe
@gopaldevra yes, sure. But please check if everything is ok.
Be sure that MainApplication.java contains:
new StripeReactPackage(),
@isnifer , I have added this manually in my app now, still getting this error
**Error:Execution failed for task ':tipsi-stripe:processDebugAndroidTestManifest'.
Manifest merger failed : Attribute data@scheme at manifestMerger8406454620979280166.xml requires a placeholder substitution but no value for
is provided.**
@gopaldevra https://github.com/tipsi/tipsi-stripe/blob/master/example/android/app/build.gradle#L102-L104
Set like this
@isnifer, still getting this error from the terminal
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex**
@gopaldevra
@gopaldevra looks like you had different support libraries version in your project and in some library project for example
Can you post whole dependencies section.
clean@rebuild can help too
@paynd
Please find my file build.gradle
build.gradle.zip
@gopaldevra Try to replace forced dependencies.
Just:
compile "com.google.android.gms:play-services-base:10.0.1"
compile "com.google.android.gms:play-services-gcm:10.0.1"
@paynd
Tried, but getting this error now
java exception in 'Native Module'
java.lang.android.gms.identity.intents.model.UserAddress
@gopaldevra can you post more details?
@paynd , thanks
Now working after adding this to the Manifest file
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
Also I am not using the Android pay.
Thanks @isnifer for your time.
@gopaldevra you're welcome. Hope, it helps. I'm closing issue
@isnifer , sure.
Please add this meta-data step to the linking instructions in the docs. It is currently under "Google Pay", but should be under main linking, as it prevents the usage of this entire library.
adding
<meta-data android:name="com.google.android.gms.wallet.api.enabled" android:value="true" />
made the build to fail, but managed to fix it with https://github.com/tipsi/tipsi-stripe/issues/383#issuecomment-474745846
Most helpful comment
@gopaldevra