Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

2 app icons after installing the release apk,using gradle build

I am using ./gradlew assembleRelease command to generate release apk for the app.On installing the app I am getting 2 icons of app.No clue what am I missing.No luch on google. On clicking the second icon it just shows Simple Indeterminate.

Here is my build.gradle file:

buildscript {
repositories {
    maven { url 'http://download.crashlytics.com/maven' }
}

dependencies {
    classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.0.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'

repositories {
    maven { url 'http://download.crashlytics.com/maven' }
}


android {
compileSdkVersion 21
buildToolsVersion '20.0.0'



defaultConfig {
    versionCode 23
    versionName "1.1.8.5"
    applicationId "com.squad.run"
    minSdkVersion 10
    targetSdkVersion 20
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}


signingConfigs {
    //Set debug.keystore file here
    release {
        def propsFile = rootProject.file('keystore.properties')
        def Properties props = new Properties()
        props.load(new FileInputStream(propsFile))
        storeFile = file(props['storeFile'])
        storePassword = props['storePassword']
        keyAlias = props['keyAlias']
        keyPassword = props['keyPassword']
    }
}
buildTypes {
    debug {
        applicationIdSuffix ".debug"
        ext.enableCrashlytics = false

    }

    release {
        zipAlign true
        signingConfig signingConfigs.release
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt')

    }

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

dependencies {
//    compile 'com.android.support:support-v4:20.0.0'
compile project(':Libraries:viewPagerIndicator_Squadrun')
compile project(':Libraries:facebookSDK')
compile project(':Libraries:library')
compile project(':Libraries:progressHUD_Squadrun')
compile project(':Libraries:slidingMenuLibrary_SquadRun')
compile project(':Libraries:MobihelpSDK')
compile 'com.squareup.retrofit:retrofit:1.5.1'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.android.gms:play-services:6.1.71'
compile 'com.android.support:appcompat-v7:21'
compile 'com.squareup.picasso:picasso:2.3.4'
compile 'org.apache.httpcomponents:httpmime:4.2.3'
compile 'com.squareup.okhttp:okhttp:1.6.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:1.6.0'
compile 'oauth.signpost:signpost-commonshttp4:1.2.1.2'
compile 'org.twitter4j:twitter4j-core:4.0.1'
compile files('libs/FlurryAnalytics-4.1.0.jar')
compile 'com.crashlytics.android:crashlytics:1.0.0'
}
like image 819
Shubham Avatar asked Nov 16 '14 13:11

Shubham


1 Answers

My top guess is that there is more than one LAUNCHER activity, and that one of them is declared in a library project. Eclipse didn't merge the manifests, but Gradle does.

So, I would suggest you search for android.intent.action.MAIN in all AndroidManifest.xml files.

like image 93
espinchi Avatar answered Nov 03 '22 15:11

espinchi