I built a game in Unity and I'm trying to export to to Android. I've set the min API in Android player settings to 14. I've confirmed with the AndroidManifest.xml file in both temp/staging and assets/plugins/android that it reflects this. It shows:
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" />
I then exported directly into an APK file right from unity (not through eclipse). I uploaded the APK to the google play store in beta mode. However, when I look at the app screen on the play store I see: Requires Android: 1.6 and up. Why is it doing this?
I'm thinking there might be a problem with the Manifest file but I'm not sure. For example, I'm using AdMob so I have these permissions in the file:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
But when I install the app through the beta link it tells me that no extra permissions are necessary. AdMob is working though, I can see the banner ads and the impressions are showing up on my AdMob account. I'm not sure if the no permissions needed thing is related to a bad manifest file or a beta store account. EDIT: Actually if I install the APK manually then it does show the permissions, so I'm guessing it's just a beta thing and my permissions are fine.
To test, I've tried exporting the file as an Android Project, then importing into Eclipse. When I try to do that, it successfully recognizes the project but even though the Finish button isn't greyed out it doesn't do anything...
Decompile your APK file to read AndroidManifest.xml.
Look at this: How to parse the AndroidManifest.xml file inside an .apk package
Apparently this is a known bug, and it doesn't seem to affect published apps, so don't worry about it:
https://gamedev.stackexchange.com/questions/67234/why-does-my-game-display-the-wrong-required-android-version-on-google-play
Related
Is anyone got rejected from google play because of REQUEST_INSTALL_PACKAGES permission ?
I removed this permission from my app even removed plugin which used it but still got this rejection.
I checked all android manifest files, even all logs there is no REQUEST_INSTALL_PACKAGES permission
I had the same issue. Actually, there will be some other older build which is containing REQUEST_INSTALL_PACKAGES permission in the Testing(OPEN, CLOSED, INTERNAL) section that's why they are rejecting the app.
You can find such a build in the Policy Status section of the app console.
Btw, To fix this you have to suspend all such kinds of builds.
One way of doing it is, Take a fresh build and upload it to Internal Testing then promote this build to OPEN testing & after then promote it to production from the OPEN testing section.
This way it will exclude the older build and your fresh build will be approved. Added Screenshot for reference.
It may be in some library that you are using, which cannot be controlled, so remove it by add this to your AndroidManifest.xml:
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"
tools:node="remove"/>
Recently I've added HMS PushKit SDK with this gradle code:
implementation "com.huawei.hms:push:5.0.4.302"
After That I've noticed that my application added to the list of apps with access to install apps from unknown source (special permission). I checked the AndroidManifest.xml file of one of this library's dependency (com.huawei.hms.base.availableupdate) and saw that it has this special permission:
<!-- If it is Android 8.0, the targetSdkVersion of the application compilation configuration>=26, please be sure to add the following permissions -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
So Why PushKit needs this permission? I don't want my app to use this permission. And If I remove it with this code is there gonna be a problem (crash):
<uses-permission
android:name="android.permission.REQUEST_INSTALL_PACKAGES"
tools:node="remove"/>
UPDATE
If you remove this permission, it will not be affected on Huawei phones,but the HMS Core APK may not be installed on non-Huawei phones.
can it cause to crash in our app because of upgrade failure?--no,Only will make the application cannot be automatically upgraded,have to uninstall and download the new version.
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
This permission is used to update the HMS Core and push kit APK. Push kit strongly depends on the HMS Core and push kit APK. If this permission is not granted, applications may fail to be installed, and causing upgrade failures of the HMS and push kit`s APK.
Therefore, this permission is mandatory.
android.permission.REQUEST_INSTALL_PACKAGES is a permission that allows a framework or a component on Android, to refer to an external (maven most often) repository, in order to minimise the final installation apk size for the end user by installing source code remotely, instead of packaging it all inside the same apk (for initial download).
Be careful with this permission, because if it is enabled, not on your app, but rather a dependency, it will be rejected. This is because if there are any security issues with your dependency, there is no way for google to pick this up, when you upload the app bundle onto the store. This is because of a remote download of the source code, instead of it being packaged inside the same apk that google can strip.
As a result google will not accept this apk, and it will be rejected (just because google does not know, and has no way of knowing if there is any malicous code being included in the final end user package).
You can try to fork this library, and remove the permission from the manifest, but then you will encounter missing method exceptions.
Your best bet in this case is to find another library that does not install extra source code from a remote maven repository, in order to avoid a google play store rejection.
Looking at this package, it looks like it's an SDK built on top of the Android SDKs. If there is a way for you to get around this, and work directly on the google android sdk, while also making it so the customer does not notice, then that should be fine. At the end of the day the customer does not care how you do it, as long as it works.
I am new to android development. recently i have uploaded my app to playstore and couldnt download it from there because i faced this issue "your device isnt compatible with this version". on further analysis I could found out that I have used feature "android.hardware.type.watch" along with android.hardware.faketouch, android.hardware.telephony. which is why i could see only watch devices in supported devices list on console (this was mistakenly ignored during rollout).
now to correct this mistake, I have removed watch feature, built apk with incremented version code. I need to replace live app on playstore with newly built apk. I have used 2 methods ( creating release in production and creating beta release )but everytime I am facing below issue "You can't rollout this release because it doesn't allow any existing users to upgrade to the newly added APKs.
i tried many time by increasing version code from 3 to 40 but same error is occur please help me
In my case, it happened because I accidently added android wear support.
Removing the following line in the manifest solved my problem
<uses-feature android:name="android.hardware.type.watch" />
Lets go in detail, Firstly as new developer i confused between Empty
Activity and Blank Activity in android while creating Activity.
Well
in my case i choose blank activity instead empty activity, then in
blank activity i get some watch and wear dependency in gradle file as
implementation 'androidx.wear:wear:1.0.0' and in manifest file
<meta-dataandroid:name="com.google.android.wearable.standalon android:value="true"/>
<uses-feature android:name="android.hardware.type.watch" />
If you publish this apk file or app bundle then you will get error as
Your device is not compatible with this version
Then i read it some where..
Your android project you have 2 apps:
1.Mobile 2.Wearable
Mobile app should be installed on mobile device (phone/tablet) and Wearable app should be installed on Android Wear device.
This message No, missing feature: WATCH means that you're trying to install Wearable app on mobile phone - you shouldn't do that, your mobile device is not a WATCH. So once again: just launch Mobile app on mobile and Wearable app on Android Wear.
After this i remove the line from manifest
<uses-feature android:name="android.hardware.type.watch" />
And upload again to the google play console then i got new error as
You can't rollout this release because it doesn't allow any existing users to upgrade to the newly added APKs
if i add this line again in manifest file then this error is gone and old error is come
Your device is not compatible with this version
Solution:
Create new application in google play console with different package name and make your change your package name in gradle file and all over.
and remove all dependencies related to watch n wear and remove line from manifest file
<meta-dataandroid:name="com.google.android.wearable.standalon android:value="true"/
<uses-feature android:name="android.hardware.type.watch" />
And publish again and check compatible device that your app is support before rollout , after publish you will get mail from google as report of tested application.
Im trying to submit my newly created Android Wear watch face through Google Play Developer Console. The problem is checkbox "Distribute your app on Android Wear" in pricing and distribution section is disabled. I cant understand why.
What I did:
1) Uploaded screenshot for Android Wear
2) Uploaded 2 APK files in closed Beta releases. Both files are signed with one key, have different version names. First is phone apk with embedded wear apk (minSdkVersion 23), second - standalone wear apk (minSdkVersion 25) has meta-data android:name="com.google.android.wearable.standalone" android:value="true" in manifest file.
Everythings seems fine and app is ready to publish in production, except the "Distribute your app on Android Wear" checkbox which remains disabled.
What Im missing?
I stumbled upon the exact same issue.
I had <uses-feature android:name="android.hardware.type.watch" /> in my manifest
I had <meta-data
android:name="com.google.android.wearable.standalone"
android:value="true" /> in my manifest
minSdk was set to 25
But still the checkbox for Wear distribution was disabled.
For fun I tried editing the HTML with Chrome's inspection tools, and removed the "disabled" attribute from the checkbox. Sure enough, the setting stuck after enabling the checkbox, and now Wear distribution is enabled. Give it a try!
You may want to check Packaging and Distributing Wear Apps and see if you've missed something.
As discussed, aside from specifying APK's version code (standalone Wear and embedded Wear), also check if you've updated your Wear module's build.gradle file to include the following if an existing embedded app has a minimum SDK version of 23:
android {
// Allows you to reference product flavors in your
// phone module's build.gradle file
publishNonDefault true
...
defaultConfig
{
// This is the minSdkVersion of the Wear 1.x embedded app
minSdkVersion 23
...
}
buildTypes {...}
productFlavors {
wear1 {
// Use the defaultConfig value
}
wear2 {
minSdkVersion 25
}
}
}
Also, check Distribute to Android Wear for more information.
I've received the email from Google support saying that they worked on the issue and changed something. They noted that my manifest file for mobile was missing line <uses-feature android:name="android.hardware.type.watch"/>
I only had this line in Wear module manifest.
I've added this line, uploaded a new version with 2 apk files for wear 2.0 and 1.0 and after that checkbox became enabled.
Currently, the official docks for Wear 2.0 don't clearly say that this line should be added to both manifest files.
Also strange that before the problem with this project I managed to successfully upload another Wear 2.0 project to Developer Console (with checkbox enabled), and the line was only in Wear module manifest.
I actually emailed Google about this - it was an issue on their side and they have now fixed it...
If you add <uses-feature android:name="android.hardware.type.watch"/> to your mobile manifest (not wearable manifest) your apk will be distributed only for WEARABLE devices! Don't do it if you want to distribute also for mobile phones.
I have the same problem. Checkbox "Distribute your app on Android Wear" is grey out. I have followed all instructions in App Distribution, added all wearable screenshots and still cannot check the box.
I have contacted support. First they said, that in my wearable manifest in need to replace:
android.hardware.type.watch
with:
android.hardware.type.WATCH
That didn't help. Next they told me, that there is a bug in developer console and it should be resolved by Tuesday May 9th. Unfortunately, they didn't fix anything or they didn't do anything at all.
Next they told me, that I need to add <uses-feature android:name="android.hardware.type.watch"/> to my mobile manifest file. I cannot do it, because apk would then be distributed only for wearable devices.
I have send them my manifest.xml and build.xml for mobile and wearable and waiting for the response.
Before april I have added about 10 wearable apps (also with 2.0 support) and there was no problem.
In my point of view they doesn't know what the problem is and cannot help us. Moreover they instructions App Distribution are out of date and In one place there is info, that minimum SDK should be 23, and few pages below there is sample code with minimum SDK 21.
Your APK requires both tags below as called out in other answers.
However, you still won't be able to check the box if the original APK (without the tags) was uploaded for the release. You must delete that APK and make sure only the APK with all those fields is left.
I made this mistake and had to hack the solution above but couldn't publish afterwards until I deleted the original APK I uploaded without the standalone tag. I asked support and they seemed to verify this.
Anyway, try that before hacking, hope that helps.
Required in your Wear manifest:
Requirement 1:
<uses-feature android:name="android.hardware.type.watch" />
Requirement 2:
<meta-data
android:name="com.google.android.wearable.standalone"
android:value="true" />
I have made an Android app using Adobe Phonegap Build. It is complete and I'm on the verge of submitting it to the Google Play market, except that I only recently discovered that in order to support the intended business model that supports the app, that I need to enable "billing" permissions.
Unfortunately, it seems it is not in any way possible to enable the billing permissions using the config.xml file where Phonegap sets the rest of the permissions. Billing is not yet, and might not ever be, supported by Phonegap.
So now I'm stuck and wondering what my options are, or if I even have any. Is it in any way possible to hack or modify the apk file generated by Adobe Phonegap Build to enable billing permissions? Is there any other way I can get the billing permission attached to my app?
(Please note that if it had been possible to build my app in native Android code, then I would have taken that option from the start, so please do not suggest that I should solve this problem by rewriting the app. For better and for worse, this is the point I'm at now. Thanks for your understanding.)
This should be possible using apktool, found here:
http://ibotpeaches.github.io/Apktool/
You should be able to decode XML resources and repackage as an APK.
Decompiling the apk is done as follows:
java -jar apktool.jar decode app.apk app
If it is just the billing permission that you need to add you will need to add the following line to the AndroidManifest.xml file:
<uses-permission android:name="com.android.vending.BILLING" />
After you have made the necessary changes you can recompile into an apk using:
java -jar apktool.jar build app app_new.apk
Several other links that you may find useful:
Android, is it possible to manually change somethings in manifest file directly from APK?
How to view AndroidManifest.xml from APK file?