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.
Related
I'm developing an android application for my company. The project holds directories: our sdk (library in this case) and a sample app that imports the sdk. When I add product flavors to the sdk (library) the app breaks due to being unable to resolve the dependencies imported from the sdk.
The errors are:
error cannot find symbol class S
error cannot find symbol class SO
error package S does not exist
error method does not override or
implement a method from a supertype
Here is the top-level/project level build.gradle file
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.novoda:bintray-release:0.9'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Here is the SDK/Library build.gradle file:
apply plugin: 'com.android.application'
apply plugin: 'com.novoda.bintray-release'
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 14
targetSdkVersion 27
versionCode 1
versionName version
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultPublishConfig "nonlocationVersionRelease"
publishNonDefault true
flavorDimensions "version"
productFlavors {
nonlocation {
dimension "version"
}
location {
dimension "version"
}
}
buildTypes {
release {
minifyEnabled false
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
}
}
lintOptions {
abortOnError false
}
}
configurations {
javadocDeps
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
}
publish {
userOrg = '*******'
groupId = 'com.*******.android'
artifactId = '*******'
publishVersion = '2.0.0'
desc = '******* sdk'
website = 'https://github.com/*******/*******-android-public-sdk'
}
and here is the app's build.gradle file:
apply plugin: 'com.android.application'
def computeVersionCode = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', 'HEAD', '--count'
standardOutput = stdout
}
return stdout.toString().trim().toInteger();
}
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.*******.demo"
minSdkVersion 15
targetSdkVersion 27
versionCode computeVersionCode()
versionName "1.0"
renderscriptTargetApi 20
renderscriptSupportModeEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
signingConfigs {
debugConfig {
storeFile file("debug.jks")
storePassword "*******"
keyAlias "com.*******.android"
keyPassword "*******"
}
releaseConfig {
storeFile file("release.jks")
storePassword "*******"
keyAlias "com.*******.android"
keyPassword "*******"
}
}
buildTypes {
debug {
signingConfig signingConfigs.debugConfig
}
release {
signingConfig signingConfigs.releaseConfig
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:preference-v7:27.1.1'
implementation 'com.google.guava:guava:23.0'
implementation 'com.squareup:seismic:1.0.2'
implementation 'net.hockeyapp.android:HockeySDK:3.7.0'
implementation 'jp.wasabeef:blurry:1.0.5'
implementation project(path: ':*******-sdk', configuration:'default')
}
I have been trying to fix this for 4 days and am still stuck. I've tried all of the typical solutions found on stackoverflow. This has been a cascade of problem after problem and this specific one came directly after updating how the sdk is loaded in the app's build.gradle file. I suspect something is wrong with this line where I import the sdk as a dependency (end of app's build.gradle):
implementation project(path: ':*******-sdk', configuration:'default')
but not including 'configuration: 'default'' causes another bug where the app cannot discern which buildVariant of the SDK to use.
How can I get my app up and running while also maintaining the product flavors found in the SDK?
Below is my build.gradle file for app.
build.gradle
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
google()
}
android {
signingConfigs {
liveSigning {
keyAlias 'xxxxxxx'
keyPassword 'xxxxxx'
storeFile file('D:\\xxxxx\\xxxxxxx\\xxxxx\\xxxx.jks')
storePassword 'xxxxxxx'
}
}
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
useLibrary 'org.apache.http.legacy'
sourceSets.main {
jniLibs.srcDir 'src/main/libs'
jni.srcDirs = [];
}
defaultConfig {
applicationId rootProject.ext.applicationId
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.compileSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
multiDexEnabled true
resConfigs "en"
vectorDrawables.useSupportLibrary true
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.liveSigning
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
task ndkBuild(type: Exec) {
commandLine rootProject.ext.ndkPath, '-C', file('src/main').absolutePath
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuild
}
lintOptions {
abortOnError false
}
productFlavors {
live {
minSdkVersion rootProject.ext.minSdkVersion
applicationId rootProject.ext.applicationId
signingConfig signingConfigs.liveSigning
targetSdkVersion rootProject.ext.compileSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
resConfigs "en"
}
}
flavorDimensions "default"
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//compile files('libs/gson-2.2.4.jar')
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
compile "com.android.support:cardview-v7:${rootProject.ext.supportLibVersion}"
compile "com.android.support:design:${rootProject.ext.supportLibVersion}"
compile files('libs/cordova-5.jar')
compile files('libs/org.apache.commons.io.jar')
compile files('libs/httpmime-4.2.3.jar')
compile files('libs/jsoup-1.7.3.jar')
compile files('libs/activation.jar')
compile project(':libraries:EventBus')
compile project(':libraries:PDFViewCtrlTools')
compile project(':libraries:imageannotations')
compile project(':libraries:bottom-bar')
compile project(':libraries:tooltip')
compile('com.crashlytics.sdk.android:crashlytics:2.5.2#aar') {
transitive = true;
}
compile files('libs/glide-3.6.1.jar')
//compile 'com.roughike:bottom-bar:2.2.0'
compile project(':libraries:k4l-video-trimmer')
compile 'com.android.support:multidex:1.0.1'
compile 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.0.1'
compile 'com.google.firebase:firebase-messaging:10.2.0'
compile 'me.relex:circleindicator:1.2.2'
compile 'com.daimajia.swipelayout:library:1.2.0#aar'
compile 'org.apache.commons:commons-collections4:4.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
apply plugin: 'com.google.gms.google-services'
Before I generate signed APK to upload for google play store , I want to execute command line code. And by using that command line program i want to do some pre release activity like disable logs of NDK, change url to live website and etc. So how can I execute it before assembleLive or assembleRelease ? I don't want to execute that command line code before "assembleDebug". I want to execute it only before "assembleLive or assembleRelease".
I added below code to my gradle file and it works like a charm.
task prelivetask (type: Exec) {
commandLine 'cmd','/C', 'start', 'change.cmd'
}
tasks.whenTaskAdded { task ->
if (task.name == 'assembleRelease' || task.name == 'assembleLive') {
task.dependsOn prelivetask
}
}
I am trying to use Jack-Jill and Java8 for my Android app. Everything is good on my laptop but when I tried to run the project on CircleCI it's getting stuck on
transformClassesWithPreJackPackagedLibrariesForDebug
Here is my build.gradle
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply from: 'test-environment.gradle'
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
mavenCentral()
}
allprojects {
repositories {
jcenter()
}
}
android {
dexOptions {
jumboMode = true
javaMaxHeapSize "4g"
}
lintOptions {
abortOnError false // true by default
checkAllWarnings false
checkReleaseBuilds false
ignoreWarnings true // false by default
quiet true // false by default
}
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
defaultConfig {
applicationId "com.projectname.android"
minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
versionCode 1
versionName "1.0"
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
ndk{
abiFilters "armeabi-v7a"
}
jackOptions {
enabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
packagingOptions {
exclude 'com/androidquery/util/web_image.html'
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
exclude 'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.properties'
exclude 'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.xml'
exclude 'META-INF/LICENSE'
}
configurations {
all*.exclude group: 'org.bytedeco', module: 'javacpp-presets'
}
if (System.getenv("CIRCLE")) {
defaultConfig {
versionCode Integer.parseInt(System.getenv("CIRCLE_BUILD_NUM"))
versionName "1.0.30"
}
} else {
defaultConfig {
versionCode 1
versionName "1.0"
}
}
signingConfigs {
debug {
storeFile file("../key.keystore")
storePassword "key"
keyAlias "key"
keyPassword "key"
}
staging {
storeFile file("../key.keystore")
storePassword "key"
keyAlias "key"
keyPassword "key"
}
release {
storeFile file("../key.keystore")
storePassword "key"
keyAlias "key"
keyPassword "key"
}
}
buildTypes {
debug {
ext.betaDistributionNotifications = false
signingConfig signingConfigs.debug
applicationIdSuffix ".dev"
minifyEnabled false
shrinkResources false
debuggable true
proguardFile 'proguard-release.cfg'
testProguardFile 'proguard-release.cfg'
manifestPlaceholders = [providerSuffix: ".dev"]
}
staging {
ext.betaDistributionEmailsFilePath = "staging_distribution_emails.txt"
ext.betaDistributionReleaseNotesFilePath = "release_notes.txt"
signingConfig signingConfigs.staging
applicationIdSuffix ".staging"
shrinkResources false
minifyEnabled true
jniDebuggable false
zipAlignEnabled true
proguardFile 'proguard-release.cfg'
manifestPlaceholders = [providerSuffix: ".staging"]
}
release {
signingConfig signingConfigs.release
shrinkResources false
minifyEnabled true
zipAlignEnabled true
jniDebuggable false
proguardFile 'proguard-release.cfg'
}
}
sourceSets {
main {
jniLibs.srcDirs 'src/main/libs'
jni.srcDirs = []
}
}
// productFlavors {
// all32 { minSdkVersion 15 }
// all64 { minSdkVersion 21 }
// }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libraries:Instagram')
compile project(':libraries:librestreaming')
compile 'com.android.support:appcompat-v7:' + project.ANDROID_SUPPORT_LIBRARY_VERSION
compile 'com.android.support:cardview-v7:' + project.ANDROID_SUPPORT_LIBRARY_VERSION
compile 'com.android.support:design:' + project.ANDROID_SUPPORT_LIBRARY_VERSION
compile 'com.android.support:support-v13:' + project.ANDROID_SUPPORT_LIBRARY_VERSION
compile 'com.android.support:support-v4:' + project.ANDROID_SUPPORT_LIBRARY_VERSION
compile 'com.android.support:percent:' + project.ANDROID_SUPPORT_LIBRARY_VERSION
compile 'com.google.android.gms:play-services-location:' + project.GMS_VERSION
compile 'com.google.android.gms:play-services-gcm:' + project.GMS_VERSION
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android:flexbox:0.2.3'
compile group: 'com.squareup.retrofit2', name: 'converter-gson', version: '2.1.0'
compile group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '3.4.1'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.facebook.device.yearclass:yearclass:1.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'hanks.xyz:smallbang-library:0.1.2'
compile('com.crashlytics.sdk.android:crashlytics:2.6.3#aar') {
transitive = true;
}
compile "com.mixpanel.android:mixpanel-android:4.+"
compile('com.yalantis:ucrop:2.2.0') {
exclude group: 'com.android.support', module: 'appcompat'
}
compile 'com.roughike:bottom-bar:2.0.2'
compile 'com.github.kenglxn.QRGen:android:2.2.0'
compile group: 'com.pubnub', name: 'pubnub', version: '4.0.11'
compile ('io.branch.sdk.android:library:2.+') {
exclude module: 'answers-shim'
}
// dagger2
compile 'com.google.dagger:dagger:2.4'
annotationProcessor 'com.google.dagger:dagger-compiler:2.4'
provided 'javax.annotation:jsr250-api:1.0'
// butterknife
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compile('com.twitter.sdk.android:twitter:2.0.0#aar') {
transitive = true;
}
}
I use tool build gradle version 2.3.0-alpha1
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0-alpha1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
here is some of what it shows in the log console:
:app:fabricGenerateResourcesDebug:app:fabricGenerateResourcesDebug
> Building 75%:app:generateDebugResources
> Building 75% > :app:mergeDebugResources:app:mergeDebugResources
> Building 75%> Building 76% > :app:processDebugResources:app:processDebugResources
> Building 76%:app:generateDebugSources
> Building 76% > :app:transformClassesWithPreJackPackagedLibrariesForDebug:app:transformClassesWithPreJackPackagedLibrariesForDebug
> Building 76%:app:processDebugJavaRes UP-TO-DATE
> Building 77% > :app:transformResourcesWithMergeJavaResForDebug:app:transformResourcesWithMergeJavaResForDebug
> Building 77% > :app:transformJackWithJackForDebug
Seems that it's stuck like forever when it tried to do something with transformJackWithJackForDebug on 77% of building process and then it reached the build time limit (I set it as 60 mins )
Has anyone faced this problem before? Please suggest.
I updated build tools, and can not compile my app.
I always got an error -
Error:Execution failed for task ':app:processProdDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is
available at
https://bintray.com/android/android-tools/com.google.gms.google-services/)
or updating the version of com.google.android.gms to 9.0.0.
my build.gradle-
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.google.gms:google-services:3.0.0'
//method count
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.3.0'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url "https://dl.bintray.com/supersonic/android-sdk" }
maven {
url "https://clojars.org/repo" }
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
project.ext {
versionCode = 14
versionName = "1.1.0.3"
minSdkVersion = 15
compileSdkVersion = 22
sdkTools = '22.0.1'
appcompatVer = "com.android.support:appcompat-v7:22.2.1"
}
my app/build.gradle
def final UNIVERSAL_IMAGE_LOADER = '1.9.5'
def final MULTIVIEW_PAGER_VER = '1.0'
def final ACTIVE_ANDROID_VER = '3.1.0-SNAPSHOT'
def final CIRCLE_IMAGE_VER = '1.3.0';
def final OKHTTP_VER = '2.4.0';
def final EMOJI_VERSION = '1.0'
def final FACEBOOK_SDK_VER = '4.1.0'
def final ROUNDED_IMAGEVIEW_VER = '2.2.1'
def final GSM_VER = '9.0.0'
def final RECYCLER_VIEW_VER = '23.1.1'
def final FLURRY_VER = '6.2.0'
apply plugin: 'com.android.application'
//uncomment this and in top-gradle file to count num of refs
apply plugin: 'com.getkeepsafe.dexcount'
apply plugin: 'com.google.gms.google-services'
dexcount {
includeClasses = true
includeFieldCount = true
printAsTree = true
orderByMethodCount = true
verbose = true
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.sdkTools
packagingOptions {
//this resolves SignalR and Protobuf conflict
//start region
exclude 'package-list'
exclude 'index.html'
exclude 'help-doc.html'
exclude 'constant-values.html'
exclude 'allclasses-noframe.html'
exclude 'allclasses-frame.html'
exclude 'resources/tab.gif'
exclude 'resources/background.gif'
exclude 'resources/titlebar.gif'
exclude 'resources/titlebar_end.gif'
exclude 'stylesheet.css'
exclude 'overview-tree.html'
//end region
}
defaultConfig {
applicationId "dating.social.viche"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.compileSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
}
signingConfigs {
release {
storeFile file("../my-release-key.keystore")
storePassword "qwertysocialapp123"
keyAlias "egoistapp"
keyPassword "qwertysocialapp123"
}
qainvalid{
storeFile file("../debug.keystore")
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"
}
}
buildTypes {
debug{
applicationIdSuffix ".debug"
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-debug-rules.pro', 'proguard-rules.pro'
}
release {
lintOptions{
//to fix google error - google_id is not translated to other lang
checkReleaseBuilds false
}
minifyEnabled true
// debuggable false
// jniDebuggable false
// renderscriptDebuggable false
// zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
qa {
signingConfig signingConfigs.qainvalid
String versionName1 = rootProject.ext.versionName + '_QA'
versionName versionName1
}
prod {
signingConfig signingConfigs.release
versionName rootProject.ext.versionName
}
}
}
dependencies {
compile project(':signalr-client-sdk-android')
compile fileTree(include: ['*.jar'], dir: 'libs')
compile "com.android.support:recyclerview-v7:${RECYCLER_VIEW_VER}"
compile "com.nostra13.universalimageloader:universal-image-loader:${UNIVERSAL_IMAGE_LOADER}"
compile "de.hdodenhof:circleimageview:${CIRCLE_IMAGE_VER}"
compile "com.pixplicity.multiviewpager:library:${MULTIVIEW_PAGER_VER}"
compile "com.michaelpardo:activeandroid:${ACTIVE_ANDROID_VER}"
compile "com.squareup.okhttp:okhttp:${OKHTTP_VER}"
compile "com.rockerhieu.emojicon:library:${EMOJI_VERSION}"
compile "com.facebook.android:facebook-android-sdk:${FACEBOOK_SDK_VER}"
compile "com.makeramen:roundedimageview:${ROUNDED_IMAGEVIEW_VER}"
compile 'com.github.orangegangsters:swipy:1.2.2#aar'
compile "com.flurry.android:analytics:${FLURRY_VER}"
compile 'com.supersonic.sdk:mediationsdk:6.4.6#jar'
compile project(':apng_lib')
compile project(':flingCards')
//SignalR libraries
// To get updated libs, make project and grab resourses : https://github.com/SignalR/java-client
// compile files('libs/gson-2.2.2.jar')
// compile 'com.google.code.gson:gson:2.3'
// compile files ('libs/signalr-client-sdk.jar')
// compile files ('libs/signalr-client-sdk-android.jar')
// compile "org.java-websocket:java-websocket:1.3.1"
// To generate new version of proto Java classes refer to tools/readme
compile files('libs/protobuf-java-2.6.1.jar')
compile ('com.google.android.gms:play-services-basement:${GSM_VER}'){
exclude module: 'support-v4';
}
compile "com.google.android.gms:play-services-analytics:${GSM_VER}"
compile "com.google.android.gms:play-services-gcm:${GSM_VER}"
}
I need compile sdk 22, because I did not implemented features from 6 android.
Please help
I've regularly used the archivesbasename to rename my output apk's but since using the google-services plugin it is being ignored. Is there anything I can do to get this working again.
Attached my full build.gradle below, be grateful for any pointers.
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
project.archivesBaseName = "MyApp";
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "org.codechimp.myapp"
versionCode 205
versionName "2.4"
minSdkVersion 14
targetSdkVersion 22
}
productFlavors {
prod {
}
dev {
versionName = android.defaultConfig.versionName + " dev"
}
}
signingConfigs {
debug {
storeFile file("debug.keystore")
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"
}
release }
buildTypes {
debug {
debuggable true
signingConfig signingConfigs.debug
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-annotations:22.2.0'
compile 'com.google.android.gms:play-services-drive:7.5.0'
compile 'com.google.android.gms:play-services-plus:7.5.0'
compile 'com.google.android.gms:play-services-gcm:7.5.0'
compile 'com.google.android.gms:play-services-ads:7.5.0'
compile 'com.google.android.gms:play-services-identity:7.5.0'
compile 'com.android.support:support-v4:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.afollestad:material-dialogs:0.6.2.4'
compile 'com.google.code.gson:gson:2.3'
compile 'com.github.andrew-codechimp:androidutils:1.19'
}
def Properties props = new Properties()
props.load(new FileInputStream(file('signing.properties')))
if (props.containsKey('STORE_FILE') && props.containsKey('STORE_PASSWORD') &&
props.containsKey('KEY_ALIAS') && props.containsKey('KEY_PASSWORD')) {
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
android.signingConfigs.release.storePassword = props['STORE_PASSWORD']
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
android.signingConfigs.release.keyPassword = props['KEY_PASSWORD']
} else {
android.buildTypes.release.signingConfig = null
}
Project level build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.google.gms:google-services:1.3.0-beta1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
}
This stopped working for me with android gradle plugin version 1.3.0 using 1.3.1 resolves it.
classpath 'com.android.tools.build:gradle:1.3.1'
Inside your build.gradle for the app you might have this.
android {
//...
defaultConfig {
//...
archivesBaseName = "myprojectname_v${versionName}_${versionCode}"
}
//...
}
If you want to change the APK name based on build type.
android {
//...
buildTypes {
special {
//...
archivesBaseName = "myprojectname_special_v${versionName}_${versionCode}"
}
}
//...
}