Android: react-native-image-picker manifest.xml invalid file path - react-native

Sorry if i don't fully respect the question pattern, it is my first question on StackOverflow. :)
I am trying to run my react native app on Android (for the first time) after a long period of code (I was only testing on iOS).
I have been fixing a lot of issues mentioned by Android Studio but can't figure out the following one:
error: invalid file path 'my_path/node_modules/react-native-image-picker/android/build/intermediates/manifests/aapt/release/AndroidManifest.xml'.
My config:
"react-native-image-picker": "^0.27.2"
"react-native": "0.56.0"
I have followed the path mentioned above, and the file exist and doesn't seem to have any error in it.
I also followed the install doc from react-native-image-picker
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:allowBackup="false"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>

Please do below steps to resolve.
File > Invalidate Caches/Restart

Related

While releasing react native app to the play store getting error, This file can't be installed on Android 12 or higher

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#
I have added the property 'android:exported' to the AndroidManifest.xml. But the same issue occurs while uploading
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.domain.example">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application android:name=".MainApplication" android:label="#string/app_name" android:usesCleartextTraffic="true" android:icon="#mipmap/ic_launcher" android:allowBackup="false" android:theme="#style/AppTheme"
android:exported="true">
<activity android:name=".MainActivity" android:label="#string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- You will also only need to add this uses-library tag -->
<uses-library android:name="org.apache.http.legacy" android:required="false" />
</application>
</manifest>

Task :app:processDebugMainManifest FAILED Manifest Merger Failed with multiple errors in React Native. My current Android Sdk Version 31

I was working fine on my react native project suddenly got this error. Didn't find any solution till now. Spent almost day finding the solution but couldn't find any solution. any kind of help will be appreciated.
my manifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wiltreactnative">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:allowBackup="false"
android:usesCleartextTraffic="true"
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">
<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>
</manifest>
Try adding implementation "androidx.test:core:1.4.0" to android/app/build.gradle dependencies enter image description here

React Native Android TV - DPad Functionality missing

I have published a react native application to google play store for Android Mobile and android tv.
App successfully published for Android Mobile but rejected for Android Tv.
For tv, I have received notification for:
Missing DPad functionality
Your app requires user interaction for menus or app navigation. Please make sure that all menus and app navigation are fully functional using a DPad. Please refer to our DPAD Control and Hardware Declaration documentation.
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rsdtech">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name= "android.permission.ACCESS_WIFI_STATE" />
<uses-feature android:name="android.software.leanback"
android:required="false" />
<uses-feature android:name="android.hardware.touchscreen"
android:required="false" />
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:banner="#drawable/tv_banner"
android:allowBackup="false"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true"
>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustPan"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
How to add DPad functionality in my project. App have functionality focus and navigation on android tv but Even then got rejected from google play console.
If you need any more info add , just let me know.
You need to use the leanbackLauncher.
I've gotten it working but am away from computer so I'll update this once I can check out how I did it, but I'm 99% sure if you Google leanbackLauncher it will lead you in the right direction

React Native: How should I incorporate this code snippet into my existing AndroidManifest.xml?

In my React Native app, I need to add the following code to my AndroidManifest.xml file:
<manifest ...>
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https"/>
</intent>
</queries>
</manifest>
My AndroidManifest.xml file currently looks like this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.intowconnect">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_STATE" />
<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">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:windowSoftInputMode="adjustResize"
android:launchMode="singleTop"
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.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
I'm not sure how to incorporate the code snippet into this. Is there a place I can just insert the <queries> block? Or do I need to change the format of my existing file?
Pre Requirement for Android Studio
Android Studio version minimum 4.1.3 with Gradle Plugin 6.8.2
For use queries you should write queries code in out of application tag not inside application tag
<manifest ...>
<application .... />
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https"/>
</intent>
</queries>
</manifest>

react-native run-android Cannot read packageName

I using this code react-native run-android It gives this error
Cannot read packageName from D:\projects\test3\android\src\main\AndroidManifest.xml
when I update my Gradle version to 2.2
this is my manifest file code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test3">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:allowBackup="false"
android:theme="#style/AppTheme">
<service android:name=".HeadlessTaskService"
android:enabled="true" />
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
1.make sure your device is connected and you had enabled debugging mode in it.
2.set paths for android_home,tools and platform_tools
3.then on console run,
adb reverse tcp:8081 tcp:8081
this command runs properly on android devices having version greater than 4.4
4.then try
react-native run-android