payu-intrepos / payu-non-seamless-react

Non-Seamless SDK for React Native
5 stars 9 forks source link

Not working with android with Gradle Version 7.x #57

Closed brokenpieworld closed 1 year ago

brokenpieworld commented 1 year ago

While its working fine with iOS, but getting error in android as below:

Caused by: org.gradle.api.plugins.UnknownPluginException: Plugin with id 'maven' not found.

If we manually update maven to apply plugin: 'maven-publish' getting another error:

Configuration with name 'compile' not found.

React Native Version 70.6 Gradle Version 7.x Compile SDK version 33

vikasis4 commented 1 year ago

getting the same error

brokenpieworld commented 1 year ago

Working fine after getting mail from payu team as below:


Kindly take the refernces from the below link for the maven issue and change the code accordingly:- 

 

https://github.com/payu-intrepos/payu-non-seamless-react/issues/35

 

After that, if you are getting compile error then comment on the below line of code from build.gradle file:- 

 

classpath += files(project.getConfigurations().getByName('compile').asList())

 

After that, you are getting tool:replace error then add the bold mark line code in the manifest file:- 

 

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:tools="http://schemas.android.com/tools"

package="com.example">

 

<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.RECEIVE_SMS" />

 

<application

    android:name=".MainApplication"

    android:allowBackup="true"

    android:icon="@mipmap/ic_launcher"

    android:label="@string/app_name"

    android:roundIcon="@mipmap/ic_launcher_round"

    android:theme="@style/AppTheme"

    android:usesCleartextTraffic="true"

    tools:replace="android:usesCleartextTraffic,android:theme">