Search code examples
androidandroid-gradle-plugingoogle-playandroid-launcher

App disappearing after upgrading to Gradle 3


I pushed out a new release for my android application to the play store for beta testers. The testers are able to update/install the new version, but afterwards the app is not displayed anywhere on the device. The play store also only has the option to Uninstall (whereas most applications have an "Open" option).

This push includes upgrading the app to Gradle 3 so I'm assuming the issue might pertain to that.

Sorry if this has been asked before I couldn't find any similar posts. Thank you for any help!

Heres some of my Gradle (*ed out private info):

def bbBuildNumber = "4";
if (project.hasProperty('BUDDYBUILD_BUILD_NUMBER')) {
    bbBuildNumber = project.properties['BUDDYBUILD_BUILD_NUMBER'];
}

android {
    signingConfigs {
        prodConfig {
            keyAlias '**** development'
            keyPassword '****'
            storeFile file('*******')
            storePassword '****'
        }
        devconfig {
            keyAlias 'key1'
            keyPassword '****'
            storeFile file('*******')
            storePassword '****'
        }
    }
    compileSdkVersion 26
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId '*******'
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 341
        versionName "1.9"
        testInstrumentationRunner "*******"
        buildConfigField "String", "BUILD_NUMBER", "\"${bbBuildNumber}\""
        multiDexEnabled true
    }
    dataBinding {
        enabled = true
    }
    buildTypes {
        debug {
            debuggable true
            buildConfigField "String", "BUILD_NUMBER", "\"${bbBuildNumber}\""
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
    dexOptions {
        javaMaxHeapSize "4g" //specify the heap size for the dex process
        preDexLibraries = false //delete the already predexed libraries
    }
    lintOptions {
        abortOnError true
        ignoreWarnings false
        lintConfig file('../config/lint.xml')
    }
    //flavorDimensions "dev", "prod"
    flavorDimensions "prod"
    productFlavors {
//        devConfig {
//            minSdkVersion 16
//            applicationId '*******'
//            targetSdkVersion 26
//            testInstrumentationRunner '******'
//            versionCode 341
//            versionName '1.9'
//            dimension "dev"
//            vectorDrawables.useSupportLibrary = true
//            javaCompileOptions {
//                annotationProcessorOptions {
//                    includeCompileClasspath false
//                }
//            }
//        }
        prodConfig {
            minSdkVersion 16
            applicationId '*********'
            targetSdkVersion 26
            testInstrumentationRunner '******'
            versionCode 341
            versionName '1.9'
            signingConfig signingConfigs.prodConfig
            dimension "prod"
            vectorDrawables.useSupportLibrary = true
            javaCompileOptions {
                annotationProcessorOptions {
                    includeCompileClasspath false
                }
            }
        }
    }
}

Heres the manifest:

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="*******">
    <application
        android:name=".dagger.******"
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/****">
        <activity
            android:noHistory="true"
            android:name="****.android.ui.splash.SplashActivity"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

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

                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <data android:scheme="app" android:host="****.com" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.*.android.ui.MainActivity"
            android:screenOrientation="portrait">

        </activity>
        <activity
            android:name="com.*.android.ui.TabbedActivity"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name="com.*.android.ui.forgot.ForgotPasswordActivity"
            android:label="@string/title_forgot_password"
            android:screenOrientation="portrait"
            android:parentActivityName=".ui.MainActivity">
        </activity>
        <activity
            android:name="com.*.android.ui.support.SupportActivity"
            android:label="@string/title_support"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name="com.*.android.ui.forgot.ForgotUsernameActivity"
            android:label="@string/title_forgot_username"
            android:screenOrientation="portrait"
            android:parentActivityName=".ui.MainActivity">
        </activity>
        <activity
            android:name="com.*.android.ui.transfer.DoTransferActivity"
            android:screenOrientation="portrait"
            android:label="@string/card_transfer_title"
            android:parentActivityName=".ui.TabbedActivity">
        </activity>
        <activity
            android:name="com.*.android.ui.transfer.bank.BankTransferActivity"
            android:screenOrientation="portrait"
            android:label="@string/bank_transfer_title"
            android:parentActivityName=".ui.TabbedActivity">
        </activity>
        <activity
            android:name="com.*.android.ui.transfer.destination.DestinationPickerActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateHidden">
        </activity>

        <activity
            android:name="com.*.android.ui.transfer.amount.AmountPickerActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateVisible">
        </activity>

        <activity
            android:name="com.*.android.ui.transfer.confirm.ConfirmationActivity"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name="com.*.android.ui.transfer.result.ResultActivity"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name="com.*.android.ui.settings.notifications.NotificationsActivity"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name="com.*.android.ui.settings.timestamp.TimestampPickerActivity"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name="com.*.android.ui.settings.document.DocumentsActivity"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name="com.*.android.ui.settings.accounts.BankAccountsActivity"
            android:screenOrientation="portrait"
            android:parentActivityName=".ui.TabbedActivity"
            android:label="@string/bank_accounts_title">
        </activity>

        <activity
            android:name="com.*.android.ui.settings.accounts.EditBankAccountActivity"
            android:screenOrientation="portrait"
            android:parentActivityName=".ui.TabbedActivity"
            android:label="@string/edit_account_title">
        </activity>

        <activity
            android:name="com.*.android.ui.profile.ProfileWebview"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name="com.*.android.ui.settings.accounts.AddBankActivity"
            android:screenOrientation="portrait"
            android:parentActivityName=".ui.TabbedActivity"
            android:label="@string/add_account_title">
        </activity>

        <activity android:name="com.*.android.ui.settings.accounts.CurrencyExchangeActivity"
            android:screenOrientation="portrait"
            android:parentActivityName=".ui.TabbedActivity"
            android:label="@string/currency_exchange_title">
        </activity>

        <activity android:name="com.*.android.ui.transfer.cashpickup.CashPickupActivity"
            android:screenOrientation="portrait"
            android:parentActivityName=".ui.TabbedActivity"
            android:label="@string/cash_pickup_title">
        </activity>

        <activity android:name="com.*.android.ui.history.CashPickupDetailsActivity"
            android:screenOrientation="portrait"
            android:parentActivityName=".ui.TabbedActivity"
            android:label="History"
            ></activity>

        <meta-data
            android:name="io.fabric.ApiKey"
            android:value="********" />
    </application>

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

Solution

  • Check in your Manifest whether at least one activity (usually your main activity) has the correct intent-filter as follows:

        <activity
            android:name="your.package.YourMainActivity">            
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    

    Your main activity should declare the action MAIN

    <action android:name="android.intent.action.MAIN"/>
    

    and the category LAUNCHER

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

    If there is no activity in your Manifest with the category LAUNCHER, the app will not be shown in the launcher.