1

I created a release key using a video tutorial from youtube and unfortunately, the release key I created before deployment had no . extension. And when check on the google cloud platform to restrict the key to my app they require a .keystore extension. but then the android tutorial for creating a release key has a .jks extension. Does the extension really matter as my app refused to show the google maps and the facebook login also fail to work? Below you can my android manifest and module app

I have however already sent a mail to the google play store to request a change of my release key (using the android tutorial with a .jks extension) still have not gotten a reply yet.

Here are some links I have looked at for help

(tutorial) https://www.youtube.com/watch?v=AWawL5HFn64

Release APK file not showing google maps

https://developer.android.com/studio/publish/app-signing#generate-key

build.gradle (module: app)

apply plugin: 'com.android.application'
android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'
    defaultConfig {
        applicationId "com.readygo.showmoney"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 7
        versionName "1.0.5"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude '.readme'
    }

    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

    sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/res/avataruni'] } }
    compileOptions {
        sourceCompatibility = '1.8'
        targetCompatibility = '1.8'
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta2'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    testImplementation 'junit:junit:4.13-beta-3'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.kaopiz:kprogresshud:1.1.0'
    implementation 'com.wrapp.floatlabelededittext:library:0.0.6'
    implementation 'com.makeramen:roundedimageview:2.3.0'
    implementation 'com.github.fuzz-productions:RatingBar:1.0.3'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.github.florent37:singledateandtimepicker:2.0.4'
    implementation 'com.github.dmytrodanylyk.shadow-layout:library:1.0.3'
    implementation 'com.zcw:togglebutton-library:1.0.0'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.seatgeek:placesautocomplete:0.3-SNAPSHOT'
    implementation 'com.google.android.gms:play-services-location:17.0.0'

    //implementation 'com.google.android.gms:play-services-places:17.0.0'
    implementation 'com.google.android.libraries.places:places:2.0.0'

    implementation 'com.android.support:recyclerview-v7:28.0.0'

    // Firebase
    implementation 'com.google.android.gms:play-services-auth:17.0.0'

    //facebook
    implementation 'com.facebook.android:facebook-login:[5,6)'

    // volley plus
    // implementation 'dev.dworks.libs:volleyplus:0.1.4'

    // retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.6.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.0'
    implementation 'com.squareup.retrofit2:converter-scalars:2.6.0'

    // okhttp
    implementation 'com.squareup.okhttp3:okhttp:4.0.1'

    // gson
    implementation 'com.google.code.gson:gson:2.8.5'

    // permission manager
    implementation 'com.karumi:dexter:5.0.0'

    // date management
    implementation 'net.danlew:android.joda:2.10.2'

    //apache common util
    implementation 'org.apache.commons:commons-collections4:4.4'

    //smart-location-lib
    implementation 'io.nlopez.smartlocation:library:3.3.3'

    //dialog progress bar
    implementation 'com.github.d-max:spots-dialog:1.1@aar'

    //pushy
    implementation 'me.pushy:sdk:1.0.43'

    //multi dex
    implementation 'com.android.support:multidex:1.0.3'

    //string manipulation
    implementation 'org.apache.commons:commons-lang3:3.9'

    // exit interface
    implementation "com.android.support:exifinterface:28.0.0"

    //custom tabs
    implementation "com.android.support:customtabs:28.0.0"

}
apply plugin: 'com.google.gms.google-services'

AndroidManifest.xml

<?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.readygo.showmoney">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <uses-feature android:name="android.hardware.camera" />

    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.hardware.camera.autofocus" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE" />
    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <uses-feature android:name="android.hardware.location.gps" />

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />

    <application
        android:name=".app.AppController"
        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=".activities.Act_Shop_Billing"></activity>
        <activity
            android:name=".activities.ShopSearchActivity"
            android:windowSoftInputMode="stateHidden" />
        <activity android:name=".activities.Act_Main_Rating" />
        <activity android:name=".activities.Create_Update_Holiday_Break" />
        <activity android:name=".activities.CreateAppointment" />
        <activity
            android:name=".activities.Act_Splash"
            android:screenOrientation="portrait"
            android:theme="@style/FullScreen">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <meta-data android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id"/>

        <activity android:name="com.facebook.FacebookActivity"
            android:configChanges=
                "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name" />
        <activity
            android:name="com.facebook.CustomTabActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="@string/fb_login_protocol_scheme" />
            </intent-filter>
        </activity>

        <activity
            android:name=".activities.Act_Login_Option"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.Act_Login"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.SendEmailActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.Act_Reg_Customer"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.Act_Reg_Barbers"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.Act_Home_Cust"
            android:screenOrientation="portrait" />
        <!--
             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=".activities.Act_Maps"
            android:label="@string/title_activity_maps" />

        <service
            android:name=".service.GpsService"
            android:enabled="true" />

        <activity
            android:name=".activities.SelectBookDateActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.Act_Choose_Photo"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.OpeningHoursActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.Act_DayTime_Choice"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.Act_Add_Service"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.Act_Add_Barber"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.Act_Home_Barber"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.Act_Upload_Profile_Picture"
            android:screenOrientation="portrait" />

        <activity android:name=".activities.Act_Barber_Shop_Services" />
        <activity android:name=".activities.Act_BookingHistory_BarberShop" />
        <activity android:name=".activities.UpcomingBarberShopBookingActivity" /> <!-- Pushy Declarations -->
        <!-- Pushy Notification Receiver -->
        <!-- Incoming push notifications will invoke the following BroadcastReceiver -->
        <receiver
            android:name=".activities.PushReceiver"
            android:exported="false">
            <intent-filter>

                <!-- Do not modify this -->
                <action android:name="pushy.me" />
            </intent-filter>
        </receiver> <!-- Pushy Update Receiver -->
        <!-- Do not modify - internal BroadcastReceiver that restarts the listener service -->
        <receiver
            android:name="me.pushy.sdk.receivers.PushyUpdateReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
            </intent-filter>
        </receiver> <!-- Pushy Boot Receiver -->
        <!-- Do not modify - internal BroadcastReceiver that restarts the listener service -->
        <receiver
            android:name="me.pushy.sdk.receivers.PushyBootReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver> <!-- Pushy Socket Service -->
        <!-- Do not modify - internal service -->
        <service android:name="me.pushy.sdk.services.PushySocketService" /> <!-- Pushy Job Service (added in Pushy SDK 1.0.35) -->
        <!-- Do not modify - internal service -->
        <service
            android:name="me.pushy.sdk.services.PushyJobService"
            android:exported="true"
            android:permission="android.permission.BIND_JOB_SERVICE" />
        <uses-library
            android:name="org.apache.http.legacy"
            android:required="false" />
    </application>

</manifest>

For the google maps, it shows a completely blank screen with no markers or maps showing.

And the facebook login shows the message "Login error: There is an error logging you into this application. Please try again later" I was also able to get the Hash key despite the error message and added it directly to the facebook developer website and it still wouldn't work.

Hans Ben
  • 81
  • 9
  • have you uploaded that on play store? it's not a big deal to have `.` extention – Hanzala Jul 29 '19 at 11:52
  • Yes, I uploaded it to the play store, and that's when I noticed the map was showing blank and facebook login showed me the error message. but it works perfectly in debug mode as I used the debug Keystore to get the SHA to add to the google console and Hash key to facebook. @Hanzala – Hans Ben Jul 29 '19 at 12:05
  • check my answer – Hanzala Jul 29 '19 at 12:20

1 Answers1

1

First of all add this in your build.gradle app module

android {
    signingConfigs {
        release {
            keyAlias 'XXXXX'
            keyPassword 'XXXXX'
            storeFile file('../keystore/XXXXX') // Add in project_directory/keystore/ don't worry about extention
            storePassword 'XXXXX'
        }

buildTypes {
        release {
            signingConfig signingConfigs.release 
        }
        debug {}
    }
   ...
    }

and then follow this

after getting the relevant fingerprints add them on Google or Facebook like a charm

Hanzala
  • 1,859
  • 1
  • 15
  • 40