安装释放apk之后,使用gradle构建2个应用程序图标 [英] 2 app icons after installing the release apk,using gradle build

查看:181
本文介绍了安装释放apk之后,使用gradle构建2个应用程序图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 ./ gradlew assembleRelease 命令为应用程序生成发行版apk。在安装应用程序时,我得到2个应用程序图标。没有线索我错过了什么。没有在谷歌luch。
单击第二个图标时,它只显示简单的不确定。



这是我的build.gradle文件:

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

依赖关系{
classpath'com.crashlytics.tools.gradle:crashlytics-gradle:1.0.0'
}
}
apply plugin:'com.android。 '
apply plugin:'crashlytics'

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


android {
compileSdkVersion 21
buildToolsVersion '20 .0.0'



defaultConfig {
versionCode 23
versionName1.1.8.5
applicationIdcom.squad.run
minSdkVersion 10
targetSdkVersion 20
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}


signingConfigs {
//在这里设置debug.keystore文件
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 {
不包括'META-INF / LICENSE。 txt'
排除'META-INF / NOTICE.txt'
}
}

依赖项{
// compile'c​​om.android.support:support-v4:20.0.0'
编译项目(':Libraries:viewPagerIndicator_Squadrun')
编译项目(':Libraries:facebookSDK')
编译项目(':Libraries:library')
编译项目(':Libraries:progressHUD_Squadrun')
编译项目(':Libraries:slidingMenuLibrary_SquadRun ')
compile project(':Libraries:MobihelpSDK')
compile'c​​om.squareup.retrofit:retrofit:1.5.1'
compile'c​​om.google.code.gson:gson: 2.2.4'
compile'c​​om.google.android.gms:play-services:6.1.71'
compile'c​​om.android.support:appcompat-v7:21'
compile' com.squareup.picasso:picasso:2.3.4'
compile'org.apache.httpcomponents:httpmime:4.2.3'
compile'c​​om.squareup.okhttp:okhttp:1.6.0'
编译'com.squareup.okhttp:okhttp-urlconnection:1.6.0'
编译'oauth.signpost:signpost-commonshttp4:1.2.1.2'
compile'org.twitter4j:twitter4j-core: 4。 0.1'
编译文件('libs / FlurryAnalytics-4.1.0.jar')
编译'com.crashlytics.android:crashlytics:1.0.0'
}


解决方案

我最大的猜想是有多个 LAUNCHER 活动,并且其中一个是在库项目中声明的。 Eclipse没有合并清单,但是Gradle确实如此。



因此,我建议您搜索 android.intent.action.MAIN code>在所有 AndroidManifest.xml 文件中。


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'
}

解决方案

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.

这篇关于安装释放apk之后,使用gradle构建2个应用程序图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆