08-03-2024 03:01 PM
I have no other errors besides this one when I upload my build to the alpha production stage. The error says this: FAIL_FORBIDDEN_PERMISSION The upload could not be completed because your application contains the following Android permissions that are not supported: - android.permission.READ_PHONE_STATE Please remove the following permissions and upload your application binary again. The log says this:
Thank you for your time.
Solved! Go to Solution.
08-03-2024 04:32 PM - edited 08-03-2024 04:36 PM
Yes, there seems to be a change on Unity 2022.3.xx in one of the latest lts version that seems to add that permision.
To fix it you can modify for AndroidManifest in your project (search for it) and at the bottom, just before the </manifest> tag, add the following line:
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />
you will need to add the tools at the top of the manifest... like this:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto"
xmlns:tools="http://schemas.android.com/tools">
with that change it will remove that permision at build time.
08-03-2024 04:32 PM - edited 08-03-2024 04:36 PM
Yes, there seems to be a change on Unity 2022.3.xx in one of the latest lts version that seems to add that permision.
To fix it you can modify for AndroidManifest in your project (search for it) and at the bottom, just before the </manifest> tag, add the following line:
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />
you will need to add the tools at the top of the manifest... like this:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto"
xmlns:tools="http://schemas.android.com/tools">
with that change it will remove that permision at build time.
08-04-2024 06:40 AM
This did not work. Every time I try to edit the manifest files, (there are 13 of them) the files regenerate or restore themselves to their original state. I have looked at all of them.
Thank you for responding so quickly.
08-04-2024 06:47 AM
Never mind it worked (I was on the wrong file) I have been trying to get this game up for so long... So I just wanted to thank you so much for this. I am so happy that I can finally just make my game.
Thank you so much for your quick response and helpful answer.
08-04-2024 06:49 AM
IF ANYONE NEEDS TO KNOW: THE CORRECT MANIFEST IS LOCATED HERE: APPNAME\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\src\main
08-04-2024 09:24 AM
i can't find the Android manifest in my project where is it??? can you send me a screen shot
08-05-2024 07:41 AM
I said above the path is: APPNAME\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\src\main
08-05-2024 08:47 AM
i still cant find it u have a screenshot?
08-05-2024 10:09 AM
On Unity on tools on the oculus options there is an option to: Create Store compatible AndroidManisfest ....
After that search for AndroidManisfest on the assets folder of Unity....
08-05-2024 12:00 PM
I prefer not to screenshot my files app