Hoi,
I have a simple app with a surfaceview nothing special one would say. However when installing on my phone I get two warnings.
1 - Phone calls
- read phone state and identity
2 - Storage
- modify/delete SD card content.
My really is nothing more than a simple puzzle and I dont understand why I get these warnings.
Any ideas how to avoid this?
Help is very much appreciated,
Kind regards
Jasper de Keijzer.
I guess the warnings you mention are user-permissions in the manifest. Check if you have in your manifest lines like:
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
and delete them.
It is most likely due to building the app for Android 1.5 (or earlier) and running it on a 1.6 or later device. According to this answer elsewhere on StackOverflow, you can fix it with the following line in your manifest:
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4" />
It hasn't worked for me, though.
Related
I'm trying to build an android game with Unity 2019.2, using IL2CPP background and Android App Bundle format.
Whenever I try to launch the game, it crashes right after the Unity splash screen.
It actually crashes when loading a scene asynchronously, I have a first scene for loading purpose, so when the game starts, this first scene opens up and load the actual game scenes in background.
I don't know if this has anything to do with my problem, but I'm using Google Play Services 0.9.64 (which is the latest right now).
I can really list everything I tried, because I had this problem for quite some time.
Right now I'm using Unity 2019.2.0f1, but the first time I had this problem was with 2019.1.10f1 and I tried with many versions, nothing seems to work there.
I checked if there was any problem with the AndroidManifest file but I don't see anything wrong.
I tried to remove the OpenGLES3 option from Player Settings > Other > Graphics APIs (it seems to be a problem for some people).
[EDIT] I tried to add permissions lines in the Android Manifest file for Internet Access (and did the same thing for this options in Unity's Player Settings).
If that might help, here's what my Android Manifest looks like:
<?xml version="1.0" encoding="utf-8"?>
<!-- This file was automatically generated by the Google Play Games plugin for Unity
Do not edit. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.example.games.mainlibproj"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="14" />
<application>
<!-- The space in these forces it to be interpreted as a string vs. int -->
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="\u003████████████" />
<!-- Keep track of which plugin is being used -->
<meta-data android:name="com.google.android.gms.games.unityVersion"
android:value="\u0030.9.64" />
<activity android:name="com.google.games.bridge.NativeBridgeActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>
</manifest>
(I prefer to hide the APP_ID value, in case that might cause security issue)
And here's the LogCat errors:
E/ActivityTrigger(2337): activityStartTrigger: not whiteListed com.████████████.████████████/com.unity3d.player.UnityPlayerActivity/41
E/ActivityTrigger(2337): activityResumeTrigger: not whiteListed com.████████████.████████████/com.unity3d.player.UnityPlayerActivity/41
E/ActivityTrigger(2337): activityResumeTrigger: not whiteListed com.████████████.████████████/com.unity3d.player.UnityPlayerActivity/41
E/InputDispatcher(2337): channel '3ea1bfc com.████████████.████████████/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
I don't know what that means and I did quite a lot of research about the "activityStartTrigger: not whiteListed" thing, but can't seem to find anything online.
Also I'm not doing anything in my code with UnityPlayerActivity.
It would be amazing if anyone could help me, I'm stuck on this problem and it prevent me from releasing my game.
Thanks a lot for your attention.
Ok so...
After A LOT of troubleshooting, I finally found the reason of these crashes, and how to fix them.
The logs I attached to the main message are actually incomplete.
I got these from Android Device Monitor's logcat, with the filter "Unity", but there's many more Unity related logs that weren't showing.
The activityStartTrigger thing is actually there on most of my builds, and is not responsible for any crashes.
The interesting one was about memory leaks:
Could not allocate memory: System out of memory!
So now, to know where that things was happening, I went back to previous git commits, to find from where the builds were crashing.
Long story short:
I had several serialized variables that I were using in the Editor only (I do a lot of Editor scripting), and since I didn't need these variable in my builds, I wrapped them in #if UNITY_EDITOR #endif instructions.
But they were still serialized, so the serialize model of my objects wasn't the same as the actual objects inside my builds.
I guess this got the memory all messy and eventually crashed my game.
So in the end, I gotta serialize all these variables, even though I'm not using them. This isn't so much data that my games will become slow or whatever, but its kinda annoying, so I'll probably find some workaround for these unused variables.
I hope this feedback can help anyone.
My users are complaining that my app now requires "run at startup" permission according the listing on Google Play. I have no need for this permission so would like to remove it from my app. I assume it must be from a library that I use but which one? In the "Merged Manifest" there is nothing about "boot" or "startup". I just have these:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
How can I track this down? My users are acting like I'm the anti-Christ for having this extra permission and I look stupid(maybe accurately) for not knowing why. Also, is there a list somewhere that shows what permissions correspond to what text on the Play store description page?
I want to address the comment about removing the permission. I understand how that is done and that's not what I'm asking. I need to know how to find the permission. Else, how can you remove something if you don't know what is is? Also, I may want to keep the permission but need to explain what it is for to my end-users.
#Mike is probably correct about WorkManager API. Still the question is how did he find that out? Why doesn't Android Studio show the permission in the Merged Manifest?
Also, even stranger is that I have removed the WorkManager API so the permission should be gone. I did check out the code for the released version and there are no left over references to WorkManager.
The easy way is from Android Studio. First build your app. Then from the build menu select Analyze APK. From there you can see the full AndroidManifest.
https://developer.android.com/studio/build/apk-analyzer
In my case the permissions did not show up in the Merged Manifest tab. Could be a bug. I think what happened is that I used a library during beta testing. Removed the code that uses library but still had a reference in build.gradle. That added the permission to the released apk's Manifest.
i have a weired problem.
I want to install a app that i made on a Nexus 5 Phone and getting the LogCat error that i postetd below.
The funny think is, if i install this app on my Samsung Galaxy S3 it works fine. Just on my nexus 5 i get those errors and warnings.
And maybe i have to mention that the same OS is installed on both phones, CyanogenMod...
LogCat
http://pastebin.com/5dqdkKPY
android manifest:
http://pastebin.com/rtkeyVw5
Thanks for your help!
I think the reason is you lack of permissions. try add this code to your AndroidManifest.xml:
<uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER"/>
Every major android component must be declared appropriately on your applications manifest file. It seems like you are using a Content Provider. Is it a provider you implement? Or is it one of the Android's build-in? In any case you have to declare your "intentions" at the manifest. Take a look here:
http://developer.android.com/guide/topics/providers/content-provider-creating.html#ProviderElement
I am new to Android and I am trying a few small apps (like Compass). When I run the app in the emulator, it gives the message Unfortunately, Compass has Stopped.
I have no compile time errors.
How do I solve this, and what is causing this?
Thanks in advance.
I had the same error message and found that, in commenting out uses-permission nodes in AndroidManifest.xml I had commented out one that was needed. When I put it back in the app ran fine. I was able to reproduce the error. I needed:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
This was for a barebones index.html, single page app, that displays Hello World.
And the permission above was the only one I needed to do Run As/ Android Application and get it to run in an emulator.
HTH
You have posted no code so it's difficult to see what your problem is. However I had the same issue which has been sorted out here Unfortunately HelloListView has stopped
It probably due to the fact that you don't have accelerometer and magnetic field support.
Go to your AVD configuration and add the following hardware: Magnetic Field Support and accelerometer
First check your AndroidManifest.xml file and write activity tag
For example, you have DisplayMessageActivity.class and package is me.user_interface
tag is:
<activity android:name="me.user_interface.DisplayMessageActivity"/>
You can write this after </activity> tag in AndroidManifest.xml file. Check the path carefully.
I used to have this clause in my AndroidManifest.xml:
<uses-configuration android:reqFiveWayNav="false"
android:reqHardKeyboard="false"
android:reqKeyboardType="nokeys"
android:reqNavigation="nonav"
android:reqTouchScreen="notouch"/>
As far as I know, these values mean "doesn't require anything at all". I added this clause mostly for completeness.
However, it caused my app to show that it is available to 0 devices in the Android Market console! Removing it fixes this, of course. Still, it seems like a bug as this setting should not cause anything to be excluded.
Has anyone with more experience seen such an issue, or, can spot my misunderstanding? Do these values actually cause restrictions?
Answering my own question -- got a reply from the Android team. It looks like this is simply a bug and "notouch" is being treated at "no touchscreen at all", which is not what it is supposed to do. So, just a little bug in the platform.
For the records, I've found that one significant change that solved my case. Full explanation is at this post on Android Market Product Group.
Quick answer is remove the following uses-feature nodes from your manifest if present:
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.hardware.faketouch" />