Closed anujec722 closed 3 years ago
Hey @anujec722 Thanks for reaching out to us. So, the deal here is that the SDK uses minVersion of 19. Because 16 is just a bit too outdated right now. Here's how you can change the minSdkVersion on your project,
root_project_folder/android/build.gradle and change minSdkVersion to 19.
Let me know if this resolves the issue for you.
Thanks
I also faced this issue and changing the minSdkVersion from 16 to 19 in android/build.gradle solved the problem it is working fine now. Thanks for your response @vivekshindhe
INSIDE /android/build.gradle
buildscript { ext { buildToolsVersion = "29.0.2" minSdkVersion = 21 // <--now use this compileSdkVersion = 29 targetSdkVersion = 29 } }
Where should I change? There's no option to do it `buildscript { repositories { google() jcenter() }
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
}
}
allprojects { repositories { google() jcenter() } }
rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') }
task clean(type: Delete) { delete rootProject.buildDir }
`
@shasank27 You are checking the wrong build.gradle file. There are two, build.gradle(:project_name) & build.gradle(:app). build.gradle(:app) is where you'll find the option to change. It'll be inside defaultConfig tag in android
Thank you. @vivekshindhe It's fixed now
Thank you. @vivekshindhe It's fixed now
How did you fix it?
INSIDE /android/build.gradle
buildscript { ext { buildToolsVersion = "29.0.2" minSdkVersion = 21 // <--now use this compileSdkVersion = 29 targetSdkVersion = 29 } }
buildscript { ext { buildToolsVersion = "29.0.2" minSdkVersion = 19 compileSdkVersion = 28 targetSdkVersion = 28 } used this combination ,got the same error..
@mharis17 The minSdkVersion should be 21. This is because of the library 'react-native-image-picker'. Doesn't have anything to do with Razorpay's Library. This should solve your problem though.
Any fix for this issue? please help me
@ankit1456 if u installed already old build from android studio or anywhere...try after removing it
Any fix for this issue? please help me
I have the same problem. If there is any solution plz??
Same problem here on fresh react native project.
> Task :app:processDebugMainManifest FAILED
11 actionable tasks: 2 executed, 9 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @36db065a
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @36db065a
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
at makeError (/Users/ika/Desktop/test/node_modules/execa/index.js:174:9)
at /Users/ika/Desktop/test/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (/Users/ika/Desktop/test/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/Users/ika/Desktop/test/node_modules/@react-native-community/cli/build/index.js:192:9)
info Run CLI with --verbose flag for more details.
@homosape did you solved it? i have the same issue
@Luttennet yes downgrading java version has helped in my scenario.
my java version now
openjdk 11.0.15 2022-04-19
OpenJDK Runtime Environment Homebrew (build 11.0.15+0)
OpenJDK 64-Bit Server VM Homebrew (build 11.0.15+0, mixed mode)
@homosape thanks mate, helped me too! I didn't even notice it changed to 18 (I think android studio downloaded it auto sadly) thank you
This is the main error I had: > Task :app:processDebugMainManifest FAILED
I fixed it by adding android:exported="true" to the \android\app\src\main\AndroidManifest.xml files activity section. For example: `<activity android:name=".MainActivity" android:exported="true"> // <- add it here. ! . !
` and just after cd .\android\ & ./gradlew clean!
help me guyz stuck with this issue for 2 days couldn't find any solution
i uninstalled admob even then same issue
@mehraj43 this doesn't have anything to do with the react-native-razorpay package. But, the activity EmptyFloatingActivity needs to have android:exported to be set to true or false in the AndroidManifest.xml. The location of the file is given in the error message you posted above. Adding that should solve it for you
there is no activity in my file such as EmptyFloatingActivity can u tell me specifically
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.supersports">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
</application>
this manifest of main location
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
this is of debug location
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.android.ads.consent" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="26" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> <application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning"> <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" /> </application>
this is of debug location
the error is of this location how do i add the activity
@mehraj43
<activity android:name="androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity" android:exported="false" /> <activity android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity" android:exported="false" /> <activity android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity" android:exported="false" />
add these lines to your Application's AndroidManifest.xml file.
thanks already did its resolve i think now was able to do bcoz of ur previoys reply thanks man
a new error occured now
The error is in react-native-fbsdk-next. They would be able to help you out there
The error is in react-native-fbsdk-next. They would be able to help you out there
ok thanks
How can I solve this issue, plz It occurs when I'm trying to run a React native project. I'm trying to solve this issue 2days ago.
I am getting same error
Using ext { buildToolsVersion = "30.0.2" minSdkVersion = 21 compileSdkVersion = 33 targetSdkVersion = 33 }
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings 364 actionable tasks: 4 executed, 360 up-to-date C:\Users\ss\simi\android\app\src\debug\AndroidManifest.xml Error: uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [com.razorpay:checkout:1.6.3] C:\Users\ss.gradle\caches\transforms-2\files-2.1\fe7c39f37fed113d582c901e55ce7d35\checkout-1.6.3\AndroidManifest.xml as the library might be using APIs not available in 16 Suggestion: use a compatible library with a minSdk of at most 16, or increase this project's minSdk version to at least 19, or use tools:overrideLibrary="com.razorpay" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:processDebugManifest'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 23s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 C:\Users\ss\simi\android\app\src\debug\AndroidManifest.xml Error: