Android : INSTALL_FAILED_MISSING_FEATURE - android

I got error INSTALL_FAILED_MISSING_FEATURE while installing my apps in emulator. I am unable to find out the where is the error. My app consists of both GPS & Camera features.
I am not getting where I am wrong. Is it problem with ANDROID MANIFEST????
Please Help me out due to this I am unable to deliver my app.Thank you
Updated
I am getting this error while installing in CONSOLE
[2012-03-16 11:24:50 - DemoCamGPS] Installation error: INSTALL_FAILED_MISSING_FEATURE
[2012-03-16 11:24:50 - DemoCamGPS] Please check logcat output for more details.
[2012-03-16 11:24:50 - DemoCamGPS] Launch canceled!
Here My logcat output details
03-16 11:24:49.351: W/PackageManager(59): Unknown permission android.permission.ADD_SYSTEM_SERVICE in package com.android.phone
03-16 11:24:49.361: W/PackageManager(59): Not granting permission android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS to package com.android.browser (protectionLevel=2 flags=0x1be45)
03-16 11:24:49.361: W/PackageManager(59): Unknown permission com.google.android.gm.permission.WRITE_GMAIL in package com.android.settings
03-16 11:24:49.370: W/PackageManager(59): Unknown permission com.google.android.gm.permission.READ_GMAIL in package com.android.settings
03-16 11:24:49.381: W/PackageManager(59): Unknown permission com.android.providers.im.permission.READ_ONLY in package com.google.android.apps.maps
03-16 11:24:49.381: W/PackageManager(59): Unknown permission com.google.android.pushmessaging.permission.RECEIVE in package com.google.android.apps.maps
Here My ANDROID MANIFEST file
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" >
</uses-permission>
<uses-feature android:name="android.hardware.camera" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.flash"
android:required="false" />
<uses-feature android:name="android.hardware.screen.landscape" />
<uses-feature
android:name="android.hardware.wifi"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-library android:name="com.google.android.maps" />
Please find out any wrong uses-feature ..

Can you post your manifest file? You're trying to use a feature( <uses-feature> ) the emulator doesn't have. My guess would be the camera.
Debug this by removing each uses-feature line one at a time until it installs without the error. The last line you removed will be the one causing this.

Are you using Google Maps, geocoding or anything related to that? If so, you should go to Project Properties > Android and link against the Google APIs for your desired API level.
If not using maps, what is the full error trace?

REMOVE BELOW USES FROM YOUR MANIFEST FILE & TRY IT.
<uses-feature android:name="android.hardware.screen.landscape" />
THIS HAPPENS COZ YOUR EMULATOR DOES'NT SUPPORT THIS FEATURES, OR TRY THIS FEATURES IT IN HIGHER VERSION API EMULATOR.

in android manifest add features android.hardware.screen.landscape to make app in horizontal view.

Related

while using flutter `esc_pos_bluetooth` showing error `Error starting scan. ` only in android 12. no problem below android 10

Showing error while running in esc_pos_bluetooth in flutter I added permission in manifest page like this.
<uses-permission android: name="android.permission.BLUETOOTH" android:maxSdkVersion="31" tools:targetApi="donut" /> <uses-permission android: name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="31" tools:targetApi="donut" /> <uses-permission android: name="android.permission.BLUETOOTH_SCAN" tools:targetApi="31" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="31" tools:targetApi="donut" /> <uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" /> <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" android:maxSdkVersion="31" tools:targetApi="donut" /> <uses-permission android: name="android.permission.ACCESS_COARSE_LOCATION" />.
And still having the error.
Error starting scan. E/flutter (16326): [ERROR: flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Platform Exception(startscan, Need android.permission.BLUETOOTH_SCAN permission for android.content.AttributionSource#8a7ab34e: GattService register Scanner, null, null).
this problem is only showing in android 10 or above devices only. under android 10 version phones support this smoothly and showing near devices also.
Using 0.4.1 with the following manifest on a real device works for me:
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-feature android:name="android.hardware.bluetooth" android:required="true"/>
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
What you are missing is the uses-feature flag. Check it out here
You can also read about hickups für Bluetooth < 12.0 on Android here

App installation fails in Android 12 devices

Our app fails to install after migrating to the targetSdkVersion 31. On trying to find the issue we found that a library was using FLASHLIGHT permission and we were getting this error while installing:
Installation failed due to: 'Failed to commit install session
130765275 with command cmd package install-commit 130765275. Error:
-127: Package com.xxxx.yyyy.zzzz attempting to declare permission android.permission.FLASHLIGHT in non-existing group
android.permission-group.HARDWARE_CONTROLS'
Permissions used in the manifest file of library:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<permission
android:name="android.permission.FLASHLIGHT"
android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
android:protectionLevel="normal" />
Is there any workaround to this issue?
android.permission-group.HARDWARE_CONTROLS is deprecated in targetSdkVersion 31 . The work around is to remove the permission used by library in your manifest by
<permission
android:name="permissionOne"
tools:node="remove"
tools:selector="com.example.lib1">
tools:node="remove"
will remove the permission from the App if its used in any of your libraries

Google Play Console - Android Bundle Permissions problem

I created my first android app in Expo, that i made the eject later on. I created the bundle and uploaded to the Google Play console, but in the list permissions appears:
android.permission.ACCESS_BACKGROUND_LOCATION,
android.permission.ACCESS_COARSE_LOCATION,
android.permission.ACCESS_FINE_LOCATION,
android.permission.ACCESS_NETWORK_STATE,
android.permission.ACCESS_WIFI_STATE,
android.permission.CAMERA,
android.permission.FOREGROUND_SERVICE,
android.permission.INTERNET,
android.permission.READ_APP_BADGE,
android.permission.READ_EXTERNAL_STORAGE,
android.permission.RECEIVE_BOOT_COMPLETED,
android.permission.SYSTEM_ALERT_WINDOW,
android.permission.WAKE_LOCK,
android.permission.WRITE_EXTERNAL_STORAGE,
android.permission.WRITE_SETTINGS,
com.anddoes.launcher.permission.UPDATE_COUNT,
com.android.vending.CHECK_LICENSE,
com.google.android.c2dm.permission.RECEIVE,
com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE,
com.google.android.gms.permission.ACTIVITY_RECOGNITION,
com.google.android.providers.gsf.permission.READ_GSERVICES,
com.htc.launcher.permission.READ_SETTINGS,
com.htc.launcher.permission.UPDATE_SHORTCUT,
com.huawei.android.launcher.permission.CHANGE_BADGE,
com.huawei.android.launcher.permission.READ_SETTINGS,
com.huawei.android.launcher.permission.WRITE_SETTINGS,
com.majeur.launcher.permission.UPDATE_BADGE,
com.oppo.launcher.permission.READ_SETTINGS,
com.oppo.launcher.permission.WRITE_SETTINGS,
com.sec.android.provider.badge.permission.READ,
com.sec.android.provider.badge.permission.WRITE,
com.sonyericsson.home.permission.BROADCAST_BADGE,
com.sonymobile.home.permission.PROVIDER_INSERT_BADGE,
me.everything.badger.permission.BADGE_COUNT_READ,
me.everything.badger.permission.BADGE_COUNT_WRITE
But in my AndroidManifest.xml i only have this:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission tools:node="remove" android:name="android.permission.READ_PHONE_STATE"/>
<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"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-feature android:name="android.hardware.camera.front" android:required="false" />
Can anybody help me? Thanks!
Ok, I checked that the permissions that appear are merged with my AndroidManifest.xml in the build. These are permissions required by packages that I added to my project. To help check which packages are needed I go to android > app > build > outputs > logs > manifest-merger-release-report.txt.
Hope it help others with the same problem :)

android custom camera crash with fail to connect to camera service

Sorry if my Question is kind of noob, just beginning to delve into Android prog. I tried to run the custom camera code taken from github
However, the app crash upon run. Logcat: java.lang.RuntimeException: Fail to connect to camera service indicates that it is due to the camera permission. I already added the camera permission in the android manifest file before, it is still showing same error.
I added permission in the android manifest as shown below;
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CALL_PHONE" />
Any clue?
Thanks in advance.

App is published on Play Store but doesn't show up on Tablets

I have published an app on Google Play Store but when I try to download it on Tablet, it says, app is not compatible.
Also, in developer console, I get this message: Your layout should make use of the available space on 7-inch tablets
Now, 1st thing , I want to lock app to only portrait orientation and hence screen usage will be almost same.
Here's the link of the app.
Some imp info about the app:
android:minSdkVersion="10"
android:largeScreens="true" AND android:xlargeScreens="true"
To support Tablets, android docs says, check if minSdkVersion is declared with value 11 or higher. , but what if I want to support devices with OS 2.3.3 ?
Please give appropriate advice.
Edit
Is this ok?
<uses-permission android:name="android.permission.CAMERA" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SEND_SMS" android:required="false"/>
<uses-permission android:name="android.permission.READ_CONTACTS" android:required="false"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Edit 2
After updating permissions part of manifest file as following, app is showing up in tabs also:
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
it says, app is not compatible.
It is showing error on device not only because minSDKversion but also google play concern about your given permission on the manifest file as well.
Like if you entered something like:
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
Your tab will not support it.
So instead of using uses-permission use <uses-feature>. And in java file check for it that your needed hardware is available or not.
For <uses-feature> see the below link:
http://developer.android.com/guide/topics/manifest/uses-feature-element.html#features-reference
Edited:
<uses-permission android:name="android.permission.CAMERA" android:required="false"/>
<uses-permission android:name="android.permission.SEND_SMS" android:required="false"/>
<uses-permission android:name="android.permission.READ_CONTACTS" android:required="false"/>
Nope you can't give permission like this because uses-permission not allowed android:required="false". Although It will not through any error it will not work.
If you will use <uses-feature> it will take the permission to access the specific hardware.
So use this:
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.telephony" android:required="false"/>
And not to forget to check this feature availability in your java code. If you will not check it, CAMERA, SEND_SMS wont work in your app.
To check camera availability use this:
import android.content.pm.PackageManager;
PackageManager pm = context.getPackageManager();
if (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
// Do you camera work here.
}

Categories

Resources