The last patch build and current release of Unity 5.3 when I load my APK all I get is a black screen. NO Unity loading screen or anything. I am using Nexus 5 with Android 6.0. My game does play on another device with Android 4.3. Same build. Has something changed for Android 6 or within Unity I need to update?
We have just encountered exactly the same issue (albeit on a couple of our projects that still use Unity 4). The app starts then immediately shows a black screen which persists forever. The app does not crash. It happens immediately on boot and it doesn’t appear to have had a chance to run any code before it occurs. There is no useful debug text in monitor as to the cause of this issue. Here are our findings in case it helps anyone:
469p2 : works
469p3 : black screen
469p4 : black screen
so for now we have reverted our Unity 4 Android projects to 469p2.
We’ve seen this for a couple of applications. What broke those apps was an error in the AndroidManifest. They were all using custom permissions without first declaring them which is illegal in Android M. Check if your application has a entry for a custom permission without first declaring that permission using a tag.
We have a fix on the way which will yield a warning regarding this in the device log as an alternative to a black screen
Ok thanks for the info. We compared the manifests from a 469p2 and 469p3 build and we can see that 469p3 has set the targetSdkVersion to 0x17 rather than 0x16, which we assume has silently triggered the problem you have described. Anyway, we can work around it for now, so we will look out for the new warning messages you mentioned
We had the same bug with permissions and black screen. After launching of application we got an error in console: “unable to query for permission: …”.
But for us fix was different.
We use one project for two different applications in the market. There are two different bundle id.
In manifest permission has declared like this:
We skipped bundle-part of permission. This part automatically inserted by android. And it works for both applications.
But it doesn’t work in case with permissions in Android M. Even though permission was declared before .
The solution was to insert bundle id in to permission name before build.