any suggest? Failure [INSTALL_FAILED_OLDER_SDK] - android

my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.vladxd.trackingpoint_2"
minSdkVersion 21
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v13:22.0.0'
compile 'com.android.support:support-v4:22.0.0'
compile 'com.google.android.gms:play-services:7.0.0'
}
and here is my Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.vladxd.trackingpoint" >
<!-- To access Google+ APIs: -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.vladxd.trackingpoint.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyB5HcvlWp6AAUBU65Iq7CC_huQi_yK1XG8" />
</application>
</manifest>
Do u have any idea how I can solve it? I've try to find this problem on another post from stackoverflow but all that don't work for me... and I don't know why.
So if u have any idea pls told me :D
Sry for my bad english.

The gradle file sets the build to be minSdk of 21 which is Android 5.0. The error is basically saying that the device you're attempting to install on has an older os.
If go into the device settings -> About Phone there should be an entry that shows your Android Version. That should then line up with the values from http://developer.android.com/reference/android/os/Build.VERSION_CODES.html

Related

module was not opening using dynamic feature in android

I am working on the dynamic feature module. I uploaded the .aab file into playstore some times app is unable to open the module throwing the error like this.
This is the error getting in logcat:
PID: 12715
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.testDynamic/com.testDynamic.zco.ZcoActivity}:
java.lang.ClassNotFoundException: Didn't find class
"com.testDynamic.zco.ZcoActivity"
on path: DexPathList[[zip file
"/data/app/com.testDynamic-1/base.apk",
This issue here is my code.
This is my Main app manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
package="com.testDynamic">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<dist:module dist:instant="true" />
<application
android:name=".Application"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Here is my module Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
package="com.testDynamic.zco"
split="dynamiczco">
<dist:module
dist:onDemand="true"
dist:title="#string/title_test">
<dist:fusing dist:include="true" />
</dist:module>
<application>
<activity
android:name="com.testDynamic.module.ZcoActivity"
android:label="#string/title_activity_test"
android:theme="#style/AppTheme.NoActionBar">
</activity>
</application>
</manifest>
Here is my main gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.testDynamic"
minSdkVersion 23
targetSdkVersion 27
versionCode 33
versionName "3.1"
}
dynamicFeatures = [":dynamicmodule",":dynamic_feature2",":dynamiczco"]
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
api 'com.android.support:appcompat-v7:27.1.1'
api 'com.android.support:recyclerview-v7:27.1.1'
api 'com.google.android.play:core:1.3.1'
api 'com.android.support.constraint:constraint-layout:1.1.2'
api 'com.squareup.retrofit2:retrofit:2.1.0'
api 'com.squareup.retrofit2:converter-gson:2.1.0'
api 'com.android.support:cardview-v7:27.1.1'
}
Here is my module gradle:
apply plugin: 'com.android.dynamic-feature'
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 20
targetSdkVersion 27
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':app')
// implementation 'com.google.android.material:material:27.0.+'
}
Anyone have an idea about this error please help me to resolve
Anyone help to solve this issue.
Thanks in advance.
Hi after researching i got the solution. Now the module was downloading without any crash.
I changed the module manifest
<dist:module
dist:onDemand="true"
dist:title="#string/title_test">
<dist:fusing dist:include="true" />
to
<dist:module
dist:instant="true"
dist:onDemand="false"
dist:title="#string/title_test">
<dist:fusing dist:include="true" />
</dist:module>
It is working fine.
Thank you all

Supported Android Devices = zero

My app can't be found when someone looks for it from their google play app on their Android phone. (shows find when searched from browser). This is because Google Play says my app supports "0 devices".
The support chat person at Google play says this is the reason:
"Your app is not compatible with certain devices due to a conflict in your app’s manifest with the following: no supported native platform:
armeabi, armeabi-v7a, and missing device features: android.hardware.faketouch, android.hardware.screen.portrait"
I can't figure out what the heck that means.
My manifest file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.deanblakely.SafeTalk"
android:installLocation="preferExternal"
android:versionCode="30"
android:versionName="1.06 " >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="25" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="${applicationId}.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false"
android:xlargeScreens="true" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<!--android:theme="#android:style/Theme.NoTitleBar" -->
<activity android:name="SplashActivity"
android:label="#string/app_name"
android:theme="#style/SplashTheme">
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="MainActivity"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
android:launchMode="singleTask"
android:theme="#style/AppTheme.NoActionBar"
>
</activity>
<receiver
android:name="com.deanblakely.SafeTalk.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.deanblakely.SafeTalk" />
</intent-filter>
</receiver>
<service android:name="com.deanblakely.SafeTalk.GcmIntentService" />
</application>
</manifest>
My gradle file is as follows:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
useLibrary 'org.apache.http.legacy' //httpClient not supported in 23.
lintOptions { disable 'MissingTranslation' }
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
}
signingConfigs {
releaseConfig {
storeFile file("XXXXXXXXXXXXXXXXX");
storePassword ("XXXXXXXXXX");
keyPassword ("XXXXXXXXXX");
keyAlias "XXXXX
}
}
buildTypes {
release {
minifyEnabled false
debuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.releaseConfig
}
debug {
debuggable true
applicationIdSuffix ".debug"
}
}
flavorDimensions "stupidDimensionone"
productFlavors {
scFlavor
{
applicationId 'com.deanblakely.SafeTalk.sc'
dimension "stupidDimensionone"
}
safetalkFlavor
{
applicationId "com.deanblakely.SafeTalk"
dimension "stupidDimensionone"
}
}
}
dependencies {
compile project(':dropboxChooserSDK')
compile files('libs/gson-2.2.4.jar')
compile files('libs/microsoft-translator-java-api-0.6.2-jar-with-dependencies.jar')
compile 'com.android.support:appcompat-v7:25+'
compile 'com.android.support:design:25+'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
}
This didn't used to be this way. I suppose it is another breaking change. Anyone know what is causing this?
As usual I am answering my own question . . .
I made the following replacement in my gradle . . .
//compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
compile 'commons-io:commons-io:2.6'
I found a post from somebody else that had the same problem. I don't know why it works and neither did the original person with the problem. I think this is either caused by buggy Google Play software and/or a complete lack of documentation.
Usually this problem are about configuration permision or uses feature
In this case looks the problem is like this:
<uses-feature android:name="android.hardware.bluetooth" />
<uses-feature android:name="android.hardware.camera" />
Check the users feature you need to change in the DOCUMENTATION

MapBox SDK not working android

I just started to use the MapBox SDK but its not working I was following the steps on the documentation but Im not getting any classes from their SDK here is my code:
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.mapp.hello"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
compile ('com.mapbox.mapboxsdk:mapbox-android-sdk:4.2.0-beta.2#aar'){
transitive=true
}
}
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.mapp.hello"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<service android:name="com.mapbox.mapboxsdk.telemetry.TelemetryService"/>
</application>
</manifest>
The com.mapbox.mapboxsdk.telemetry.TelemetryService is shown in red and I cannot import the MapboxAccountManager
I know it's an old question, but I just had the same error while trying to update from Mapbox 4.x to 5.x and it turns out you have to change:
<service android:name="com.mapbox.mapboxsdk.telemetry.TelemetryService"/>
to
<service android:name="com.mapbox.services.android.telemetry.service.TelemetryService" />
Update:
Turns out in the latest version (5.x) you don't have to declare it in the Manifest at all, as Mapbox now makes use of Manifest merge feature.
I dont know how but the app was getting run even though gradle build was stopped because of lint, I just stopped lint from stopping the build process now everything is working :)

app-release.apk showing "Parse error: There is a problm parsing application"

I have checked many answers but none of them helped
I am running it 5.1.1 android, and in build.gradle it is minSdkVersion as 15 so it should work.
I am able to run app-debug.apk on same device without any issue.
I have not renamed apk file after that, i have signed it for the first time manually in android studio.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.raghav.pokemonfinder"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.android.support:design:23.4.0'
apply plugin: 'com.google.gms.google-services'
compile 'com.firebase:firebase-client-android:2.4.0'
compile 'com.google.android.gms:play-services-location:9.0.2'
compile 'me.sargunvohra.lib:pokekotlin:2.2.3'
}
and here is my androidmanifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.raghav.pokemonfinder">
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the 'MyLocation' functionality.
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name="Utils.PokeMonFinder"
android:allowBackup="true"
android:icon="#drawable/icon2"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/MyMaterialTheme">
<!--
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key that is used to
sign the APK for publishing.
You can define the keys for the debug and release targets in src/debug/ and src/release/.
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".MapsActivity"
android:label="#string/title_activity_maps" />
<activity android:name=".MapsShowActivity" />
<activity
android:name=".SplashScreenActivity"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SubmitPokemon" />
<activity android:name=".PokemonDetailActivity" />
<activity
android:name=".HomeActivity"
android:label="#string/title_activity_home"
android:theme="#style/MyMaterialTheme" />
<activity android:name=".MyPokemonActivity" />
</application>
</manifest>

Supported Android devices: 0 devices

we are the developers of TourisMap. We don't understand why after the upload of our apk on the Google Play Developer Console we have 0 devices supported. Our personal thought is the Manifest and the build.gradle are ok: we can produce apk, than we can distribuite it to our beta tester without problems. Can you help us? Where is our error here, in your opinion?
AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.caronteconsulting.tourismap"
android:versionName="#string/version">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<supports-screens android:largeScreens="true"
android:normalScreens="true" android:smallScreens="true"
android:anyDensity="true"></supports-screens>
<uses-sdk android:minSdkVersion="13" android:targetSdkVersion="13" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="asd"/>
<activity
android:configChanges="orientation|keyboardHidden|screenSize"
android:name=".MainActivity"
android:label="#string/app_name" >
</activity>
<activity
android:name=".SplashActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
build.gradle (app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.caronteconsulting.tourismap"
minSdkVersion 13
targetSdkVersion 13
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig getSigningConfig()
applicationVariants.all { variant ->
variant.outputs.each { output ->
def date = new Date();
def formattedDate = date.format('yyyyMMddHHmmss')
def newName = output.outputFile.name
newName = newName.replace("app-", "TourisMap-")
newName = newName.replace("-release", "-release" + formattedDate)
output.outputFile = new File(output.outputFile.parent, newName)
}
}
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
}
Set the targetSdkVersion to 23.
We found the problem. Thanks to the indications here, we found the line that generates 0 devices into build.gradle :
dependencies {
[...]
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
}
We use that lib to acquire strings in UTF-8. We delete our dependencies from org.apache.commons.io, than we delete the line:
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
from the build.gradle, we compile and upload on Google Play... Tadaaaa! 8233 devices. Why this happens? We don't know: Android Studio adds this line when you use Apache.Commons.IO functions and Google Play does not recognizes this lib... boh! Thanks for the help guys.

Categories

Resources