Is there a max value for versioncode?

Update 08/11/2016 (UTC): The docs has been updated. Not the old MAX_INT value nor the 2000000000. Warning: The greatest value Google Play allows for versionCode is 2100000000. Cross-post for visibility here. It seems there was a recent change in Google, making the maximum versionCode up to 2000000000 only. Reference post: Google Play Developer Console error: … Read more

Jacoco with Gradle 0.10.0: Remote object doesn’t exist

Try This One… buildscript { repositories { mavenCentral() } dependencies { classpath ‘com.android.tools.build:gradle:0.13.0’ } } repositories { mavenCentral() } apply plugin: ‘com.android.application’ apply plugin: ‘jacoco’ android { compileSdkVersion 21 buildToolsVersion “21.1.1” // Must Require defaultConfig { applicationId “com.packagename” <Change it> minSdkVersion 11 targetSdkVersion 21 versionCode 1 versionName “1.0” } packagingOptions { exclude ‘META-INF/DEPENDENCIES’ exclude ‘META-INF/LICENSE’ … Read more

create version.txt file in project dir via build.gradle task

The example you’re referring to is almost correct. With a couple of minor tweaks it works as expected: import java.text.SimpleDateFormat import org.ajoberstar.grgit.Grgit plugins { id “org.ajoberstar.grgit” version “1.7.2” } version = 1.0 task versionTxt() { doLast { new File(projectDir, “version.txt”).text = “”” Version: $version Revision: ${grgit.head().abbreviatedId} Buildtime: ${new SimpleDateFormat(“dd-MM-yyyy HH:mm:ss”).format(new Date())} Application-name: foobarbaz app “”” … Read more

Gradle Warning: missing groovy return statement

With Android Studio 2.2 I had to add a return void before the final bracket in the android section. android { compileSdkVersion 24 buildToolsVersion “24.0.2” defaultConfig { applicationId “com.example.app” minSdkVersion 19 targetSdkVersion 24 versionCode 1 versionName “1.0” } buildTypes { debug { minifyEnabled false shrinkResources false } release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile(‘proguard-android.txt’), … Read more

How to use flavors with different app names in Android studio?

Remove the app_name string from your existing strings.xml file, then you can do this: productFlavors { originalFlavour{ resValue “string”, “app_name”, “Original Flavor Name” } freeFlavour{ resValue “string”, “app_name”, “Free Flavor Name” } } Then the existing reference to @string/app_name in your manifest will refer to a generated string resource, which is based on the flavor … Read more

The project is using an incompatible version (AGP 7.3.0-alpha07) of the Android Gradle plugin

Try either to upgrade Android Studio or change AGP version to the stable version like for example 7.2.1 in the project’s build.gradle file and sync the project: buildscript { //… dependencies { classpath ‘com.android.tools.build:gradle:7.2.1’ // … } } You can refer this table, that lists which version of Gradle is required for each version of … Read more