I am in Unity and I imported a new appodeal sdk and I get this error: Manifest merger failed with errors - unity3d

1.Before I added the appodeal plug in everything was fine, but I also have unity ads and google services installed, so maybe that's part of the problem. I also removed the target sdk version from the manifest because I thought it will help but it didn't. This is the appodeal manifest :
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="27"/>
<application android:allowBackup="true" android:networkSecurityConfig="#xml/network_security_config"
android:name="androidx.multidex.MultiDexApplication">
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!--optional-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<!--optional-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!--optional-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!--optional-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<!--optional-->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
<!--optional-->
<uses-permission android:name="android.permission.VIBRATE"/>
<!--optional-->
[![enter image description here][1]][1]

I had the same error: Missing 'package' key attribute on element package at [:com.my.target.mytarget-sdk-5.11.7:] AndroidManifest.xml:15:9-54. But you posted the wrong manifest. The error is in a generated one, inside the cache folder of grandle.
But here is the fix:
Preparing your Gradle build for Android 11
You need to change classpath 'com.android.tools.build:gradle:3.4.0' to 'com.android.tools.build:gradle:3.4.3' in gradle file. (Unity 2017.4 - Unity 2019.4)
You need to change classpath 'com.android.tools.build:gradle:3.6.0' to 'com.android.tools.build:gradle:3.6.4' in gradle file. (Unity 2020.1)
For versions (Unity 2017.4 - Unity 2019.2) you can change gradle version in /Unity/Hub/Editor/UNITY_VERSION/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/mainTemplate.gradle or directly in mainTemplate.gradle in the project.
For versions (Unity 2019.3 - Unity 2020.1) you can change gradle version in /Unity/Hub/Editor/UNITY_VERSION/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/baseProjectTemplate.gradle or directly in baseProjectTemplate.gradle in the project.
This is from the Appodeal Documentation Docs

Related

I am having issues uploading my app to Google playstore

I have been trying to upload my flutter app to playstore, but it got rejected, I got an email like this below
This is how my pubspec.yaml file look like
my Androidmanifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test" xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
I was thinking maybe the permission_handler is the cause of the rejection,
but based on my research online, I believe it suppose to go through since I added this
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
I think you misunderstood the Google Playstore message.
They are telling you that your app shouldn't use this permission:
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
So you have two options:
Either Remove this permission request from your app or
argue with the Google Playstore support about why your app really needs this permission. They list a few allowed cases (web browsing as a core functionality for example)

(Flutter) Google Play Console: Issue found: Need to use Media Store API or No Access to Files

I am trying to publish my app on the Google Play Console. They are refusing it because it seems they don't like the permissions I gave to my app:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="my.basketball.cleanmaybe">
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
I found how to ask permission to the camera app but not to the gallery. Can someone tell me how can I resolve this?
This is what I got in my mail:

java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission

After asking for runtime permission for BLUETOOTH_CONNECT, android 12 crashes , I faced this problem in Samsung Android 12 Device. In other device less then Android 12 is working fine.
I handled bluetooth permission but still my app going to crash
manifest
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
sdk -> 31
Showing this type of error after build the app.
I got the solution.
As you can see the BLUETOOTH permission is disabled in Android 12. This issue resolved if I add the maxSdkVersion for the BLUETOOTH permission.
So I update permissions in manifest file :
Old This:
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
to
new this:
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" android:required="false" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" android:maxSdkVersion="30" android:required="false" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" android:required="false" />

Android Build Error when using the barcodescanner and qrscanner at the same time

When I use the phonegap-plugin-barcodescanner plugin and the cordova-plugin-qrscanner plugin at the same time in a project, it won't compile for the android plattform. The error it outputs is duplicate permission element in the manifest. Upon checking I saw that this is indeed the case. However manual correction doesn't work as it will be regenerated automatically.
I documented the reproduction scenario further down. It is very simple. Maybe someone has an idea how to solve this issue? Or do you think this is a bug? But where should I open the issue in such a case?
Used version:
Ionic: 3.20.0
cordova: 8.0.0
Steps to reproduce:
Start a new project ionic start permissionissue blank (when it asks if it should integrate with the iOS and Android platform say yes, when it asks to install the ProSDK say no
Change into the project folder: cd permissionissue
Build it: ionic cordova build --release android -> Still everything is fine
Install the first plugin: ionic cordova plugin add phonegap-plugin-barcodescanner
Build it: ionic cordova build --release android -> Still everything is fine
Install the second plugin: ionic cordova plugin add cordova-plugin-qrscanner
Try to build it: ionic cordova build --release android -> Now it breaks
It will show the following error:
> Manifest merger failed with multiple errors, see logs
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug
option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
23 actionable tasks: 3 executed, 20 up-to-date
(node:12659) UnhandledPromiseRejectionWarning: Error: .../permissionissue/platforms/android/gradlew: Command failed with exit code 1 Error output:
.../permissionissue/platforms/android/app/src/main/AndroidManifest.xml:19:5-90 Error:
Element uses-permission#android.permission.CAMERA at AndroidManifest.xml:19:5-90 duplicated with element declared at AndroidManifest.xml:16:5-65
.../permissionissue/platforms/android/app/src/main/AndroidManifest.xml:20:5-85 Error:
Element uses-feature#android.hardware.camera at AndroidManifest.xml:20:5-85 duplicated with element declared at AndroidManifest.xml:18:5-84
.../permissionissue/platforms/android/app/src/main/AndroidManifest.xml Error:
Validation failed, exiting
FAILURE: Build failed with an exception.
The generated Manifest looks like this:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-permission android:name="android.permission.CAMERA" android:required="false" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.front" android:required="false" />
As you can see the CAMERA is once requested by itself and once with required false.
I had similar issue using cordova-plugin-camera-preview & cordova-plugin-qrscanner
What helped me was:
1. Go to plugins/cordova-plugin-qrscanner/plugin.xml
remove entries within
<config-file target="AndroidManifest.xml" parent="/*">
...
</config-file>
run
ionic cordova platform remove android
run
ionic cordova platform add android
This is how my <platform> section look like, from plugin.xml of cordova-plugin-qrscanner
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="QRScanner">
<param name="android-package" value="com.bitpay.cordova.qrscanner.QRScanner"/>
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/*">
<!-- <uses-permission android:name="android.permission.CAMERA" android:required="false" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.front" android:required="false" /> -->
</config-file>
<source-file src="src/android/QRScanner.java" target-dir="src/com/bitpay/cordova/qrscanner"/>
<framework src="src/android/qrscanner.gradle" custom="true" type="gradleReference"/>
</platform>
Worked for me, hope it help you as well.

Is it possible in Google Play why an App is not compatible with a device?

Within the AndroidManifest.xml I can see the following lines:
<uses-sdk android:minSdkVersion="16" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>
<uses-feature android:name="android.hardware.sensor.gyroscope" android:required="true"/>
<uses-permission android:name="android.permission.NFC"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
So I guess the compatibility issue is due to some of the followings:
minSdkVersion
accelerometer
gyroscope
Is it possible to know which one/s is the compatibility issue within Google Play. Should we check one by one "manually"?
According with the answer of Google, it seems that nowadays we have to check it manually as I have stated in the question.
The answer of Google was: "If you'd like to know why specific device is not compatible with the app, you'll need to check if all the features you requested in the APK are supported by the device. Also you'll need to check the Android version"