Android release on play market - android

This is my first time release an app on play market. When i uploaded it for the first time, I got error which says that no device is compatible. Then, I found that I need to add these lines to manifest
<?xml version="1.0" encoding="utf-8"?>
<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.NFC" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<application
android:name=".MyApp"
android:allowBackup="true"
android:icon="#mipmap/icon"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".ui.activities.StartActivity"
android:screenOrientation="portrait"
android:showOnLockScreen="true"
android:windowSoftInputMode="stateVisible|adjustResize" />
<activity
android:name=".ui.activities.Activity1"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="#xml/nfc_tech_filter" />
</activity>
<activity
android:name=".ui.activities.MainActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustResize" />
<provider
android:name=".model.db.Provider"
android:authorities="com.me.model.db.Provide"
android:exported="false"
android:multiprocess="true" />
<service
android:name=".model.services.OperationsFinishService"
android:exported="false" />
<service
android:name=".model.services.Service"
android:exported="false" />
<activity
android:name=".ui.activities.SplashActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/title_activity_splash"
android:screenOrientation="portrait"
android:theme="#style/FullscreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ui.activities.NoInternetActivity" />
</application>
I uploaded it again and I got this same error though. Can anybody show me how to solve this?
Can it be that I didn't specify what cpu type to support?
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a', 'mips'
universalApk true
}
}
Can these lines make it work?
My gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
lintOptions {
checkReleaseBuilds false
}
defaultConfig {
applicationId "com.me.myapp"
minSdkVersion 17
targetSdkVersion 23
versionCode 7
versionName "0.6"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
useLibrary 'org.apache.http.legacy'
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a', 'mips'
universalApk true
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
compile 'com.github.pro100svitlo:creditCardNfcReader:0.9.1'
compile 'org.jetbrains:annotations-java5:15.0'
compile 'com.google.firebase:firebase-core:9.0.0'
compile 'com.google.firebase:firebase-crash:9.0.0'
}
apply plugin: 'com.google.gms.google-services'

Related

other activity showed up in place of Main Activity when multiple modules are combined in to a single project in android

I have many android modules implemented in my project. Each module is added as an independent Android module which can be launched on mobile or an emulator. After working on all the modules. Finally, I wanted to merge all those independent modules into one project and connect everything and make all the modules work as a single app.
To do that, I've replaced apply plugin: 'com.android.application' with
apply plugin: 'com.android.library' in all the module's gradle file except for the app/build.gradle which is the first module in the app and it has apply plugin: 'com.android.application'in its gradle.
Also, in the app/manifest.xml I have this defined in it:
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
But, when I launch the app on an emulator or a real device. The activity of the fourth module which is named as FirstTimeProfileSetup (i.e. not MainActivity) shows up on the screen as a first screen. when we wait for some time without any operations on the screen, then the FirstTimeProfileSetup screen goes off and the MainActivity of the app module will show up.
Below is the manifest.xml file of app module:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<!--<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="25" />-->
<application
android:allowBackup="true"
android:icon="#mipmap/app_logo"
android:label="#string/app_name"
android:roundIcon="#mipmap/app_logo"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:replace="android:icon,android:roundIcon">
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".loginAndSignup.sign_in"
android:label="sign_in"
android:parentActivityName=".MainActivity"
android:theme="#style/AppTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity android:name=".Registration" />
</application>
</manifest>
Below is the manifest of the other module whose activity is showing up first:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.firsttimeusermodule">
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="25" />-->
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".FirstTimeProfileSetup"></activity>
<activity android:name=".ProfilePic"></activity>
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.firsttimeusermodule"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths"></meta-data>
</provider>
</application>
</manifest>
and below is the build.gradle of app module:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-frtti -fexceptions"
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.facebook.android:facebook-android-sdk:4.22.1'
compile 'com.google.gms:google-services:3.1.0'
compile 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'
compile 'com.google.gms:google-services:3.1.0'
compile 'com.google.android.gms:play-services-auth:11.0.0'
compile 'com.google.android.gms:play-services-maps:11.0.0'
compile project(path: ':usertype')
compile project(path: ':firsttimeusermodule')
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
}
apply plugin: 'com.google.gms.google-services'
and below is the build.gradle file of the other module:
apply plugin: 'com.android.library'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
// applicationId "com.firsttimeusermodule"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.google.gms:google-services:3.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
Can anyone please helps me resolve this problem.
Thanks in advance
Here's the screenshot of Merged Manifest:

No change in manifest and gradle but now on uploading apk showing 0 supported device

Earlier all the version were having no problem after updating android studio and uploading the app on play store it is showing supported device 0. The manifest and gradle are unchanged except the version name and version code.
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/MyMaterialTheme">
<service
android:name=".services.MyAccessibilityService"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">    
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
</service>
<activity android:name=".About" />
<activity android:name=".AccessibilityPermission" />
<!-- Include the AdActivity configChanges and theme. -->
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
<activity android:name=".SettingsActivity" />
<activity
android:name=".MainNavigationActivity"
android:label="#string/app_name"
android:theme="#style/MyMaterialTheme">
</activity>
<activity android:name=".SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
and my gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "in.zuts.notificationlogger"
minSdkVersion 18
targetSdkVersion 24
versionCode 4
versionName "0.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.google.android.gms:play-services-ads:10.0.1'
compile 'com.google.firebase:firebase-ads:10.0.1'
compile 'com.android.support:support-vector-drawable:24.2.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
I uploaded the apk anyway with 0 supported device. After few minutes the real figures were shown in supported device. Anyone with similar problem can rollout their apk in beta and can check if their problem is resolved.

Error:Execution failed for task ':app:prepareComGoogleAndroidGmsPlayServicesAds1020Library'. > Could not expand ZIP 'play-services-ads-10.2.0.aar'

I've just started learning android studio and I have created a simple app but when I was about to sign the APK I've got this error message.
Error:Execution failed for task ':app:prepareComGoogleAndroidGmsPlayServicesAds1020Library'.
Could not expand ZIP 'C:\Users\yugio\AppData\Local\Android\sdk\extras\google\m2repository\com\google\android\gms\play-services-ads\10.2.0\play-services-ads-10.2.0.aar'.
I do not know what to do; and I've tried the directory permissions and it did not work. I'm running Windows 10 Pro.
Here is manifest
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
<activity android:name=".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>
<activity android:name=".SecondActivity" android:label="Verification Status" />
</application>
and this is my Gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.paradoxygo.yugiohduellinkscheat"
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.1'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-ads:10.2.0'
}

Device supporting is Zero in play store

I am publishing my application to play store but i am getting device supporting zero. I have try with many changes and i am posting the code for gradle and manifest file. Please go through the code..
Gradle File:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
//noinspection GradleDynamicVersion
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
signingConfigs {
config {
keyAlias 'XXXXXX'
keyPassword 'XXXXXX'
storeFile file('E:/Project/Client Resources/Keys/XXXXX')
storePassword 'XXXXXX'
}
}
compileSdkVersion 24
buildToolsVersion "23.0.3"
defaultConfig {
multiDexEnabled true
applicationId "com.inteXXXXXXX"
minSdkVersion 16
targetSdkVersion 24
versionCode 3
versionName "1.02"
}
buildTypes {
debug {
buildConfigField "boolean", "DEBUGGABLE", "true"
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "DEBUGGABLE", "false"
signingConfig signingConfigs.config
}
}
productFlavors {
}
}
repositories {
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:design:24.2.0'
compile 'com.github.PhilJay:MPAndroidChart:v2.1.6'
compile 'com.github.bmarrdev:android-DecoView-charting:v1.1'
compile 'com.android.support:recyclerview-v7:24.2.0'
compile 'com.pkmmte.view:circularimageview:1.1'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.android.support:percent:24.2.0'
compile 'com.android.support:cardview-v7:24.2.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.0.1'
compile 'org.apache.directory.studio:org.apache.commons.codec:1.8'
compile 'joda-time:joda-time:2.9.4'
// Retrofit & OkHttp
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
compile files('libs/DraggableGridView.jar')
}
and here is the manifest file for the code..
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.inteXXXXXX">
<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" />
<application
android:name=".utils.InteXXXXXXXXXXXXXX"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat">
<activity
android:name=".common.SplashActivity"
android:screenOrientation="portrait"
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=".common.LoginActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar.FullScreen" />
<activity
android:name=".caregiver.controller.viewcontroller.activity.CaregiverTaskBoardActivity"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".caregiver.controller.viewcontroller.activity.PatientListActivity"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".caregiver.controller.viewcontroller.activity.MenuActivity"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".caregiver.controller.viewcontroller.activity.MedicationEditActivity"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".caregiver.controller.viewcontroller.fragments.ObservationFragment"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".caregiver.controller.viewcontroller.fragments.VillageFragment"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".caregiver.controller.viewcontroller.activity.InfoActivity"
android:screenOrientation="portrait"
>
</activity>
<meta-data
android:name="io.fabric.ApiKey"
android:value="e84ec6e6521086a73a9e544c96270b1d78962e10" />
</application>
</manifest>
Please help, as I am trying from hours regarding this issue.

Android Studio AdMob error cannot resolve symbol #integer/google_play_services_version"/>

I am trying to get AdMob into my app but this error comes up and I am not sure how to fix it.
<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"/>
<activity
android:name=".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>
<activity android:name="com.google.android.gms.ads.AdActivity"
android.configChanges="keyboard|keyboardHidden|
orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>"
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout
|uiMode|screenSize|smallestScreenSize" />”
<activity android:name=".SettingsPage"
android:label="Settings"
android:theme="#style/AppTheme"/>
</application>
Also, the line
<activity android:name="com.google.android.gms.ads.AdActivity"
has an error saying cannot resolve symbol AdActivity. I'm not sure what's causing these issues, and would appreciate some help.
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.name.application"
minSdkVersion 16
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:appcompat-v7:22.2.0'
}
You need to add a line in your build.gradle to compile Google Play Services, take a look at the documentation here
So your dependencies should be something like this if you're using the latest version of Google Play Services:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.google.android.gms:play-services:7.5.0'
}

Categories

Resources