I've recently updated gradle to 3.4.0 and when uploading the build to the store I received a warning message letting me know that users will not be able to see the new build.
The only difference between the old apk and the new one is that the new one only has these native platforms
Native platforms
arm64-v8a, armeabi-v7a, x86, x86_64
while the old one also has the mips abi.
I went to the store after a couple of hours after uploading he build and I can't see the new build.
Any ideas ?! Why does that influence the apk from being able to be seen from the store, if they're deprecated... ?!
Or could the problem come from another place?
EDIT
Could the problem arise from this instead by any chance?
// Butterknife requires Java 8.
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
EDIT 2
Here's my entire app level build.gradle
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.29.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
lintOptions { checkReleaseBuilds false }
compileSdkVersion 28
buildToolsVersion '28.0.3'
signingConfigs {
releaseSign {
storeFile file("$rootProject.projectDir/keystore_release.jks")
storePassword 'xxxxx'
keyAlias 'xxxx'
keyPassword 'xxxx'
}
}
// Butterknife requires Java 8.
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.xxxx.driver"
minSdkVersion 19
targetSdkVersion 28
versionCode 27
versionName "1.0.27"
renderscriptTargetApi 19
renderscriptSupportModeEnabled true
multiDexEnabled true
splits {
abi {
reset()
include "x86", "armeabi-v7a", "armeabi-v8a", "x86_64", "mips", "mips64"
universalApk true
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.releaseSign
}
}
flavorDimensions "default"
productFlavors {
beta {
applicationId "com.xxxx.driver.beta"
dimension "default"
resValue "string", "app_name", "Driver Beta"
resValue "string", "privacy_policy_url", "https://www.xxxxxx"
buildConfigField "String", "BASE_URL", '"https://xxxxxxx"'
buildConfigField "Boolean", "IS_BETA", "true"
buildConfigField "String", "TENANT", '"xxxxx"'
}
production {
applicationId "com.xxxxx.driver"
dimension "default"
resValue "string", "app_name", "Driver"
resValue "string", "privacy_policy_url", "https://www.xxxxx"
buildConfigField "String", "BASE_URL", '"https://xxxxx"'
buildConfigField "Boolean", "IS_BETA", "false"
buildConfigField "String", "TENANT", '"xxxx"'
}
}
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/notice'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license'
exclude 'META-INF/license.txt'
}
}
configurations.all {
// resolutionStrategy {
// eachDependency { DependencyResolveDetails details ->
// if (details.requested.group == 'com.android.support' && details.requested.name != 'multidex') {
// details.useVersion "28.0.0"
// }
// }
// }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha06'
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'me.grantland:autofittextview:0.2.1'
implementation 'com.android.volley:volley:1.1.1'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.github.ybq:Android-SpinKit:1.2.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.0'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
def work_version = "2.0.1"
implementation "androidx.work:work-runtime:$work_version"
// Optional - RxJava2 support
implementation "androidx.work:work-rxjava2:$work_version"
def futures_version = "1.0.0-beta01"
implementation "androidx.concurrent:concurrent-futures:$futures_version"
implementation 'com.github.delight-im:Android-AdvancedWebView:v3.0.0'
}
apply plugin: 'com.google.gms.google-services'
And my top level build.gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
So I figured it out myself. The solution was that, their system is buggy. There is nothing wrong with my app. I sent them an email and they answered after a week+. After that, everything is working fine. A number of days after posting this question, a colleague also had this issue with another app, so if you do happen to come across this issue send them an email and ask.
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?
I have an app already published on the store, after upgrading to Android Studio 3 (now 3.1) and the forced update of gradle I am unable to import my external projects as modules.
I have tried removing all my modules and adding them one by one, deleting the cache, changing gradle version, and compileSdkVersion but it doesn't work.
When I try to sync gradle I receive some messages like this:
Unable to resolve dependency for ':app#produzioneDebug/compileClasspath': Failed to transform file 'ShareLib-release.aar' to match attributes {artifactType=android-exploded-aar} using transform ExtractAarTransform
This is in my settings.gradle to make external project available:
include ':app'
include ':ShareLib'
project(':ShareLib').projectDir = new File('..//ShareLib//')
This is my build.gradle
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'io.fabric.tools:gradle:1.+'
}
}
repositories {
jcenter()
mavenCentral()
mavenLocal()
maven {
url 'https://repo.spring.io/libs-milestone'
}
maven { url 'https://maven.fabric.io/public' }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
def AAVersion = '4.4.0'
android {
compileSdkVersion 26
buildToolsVersion "27.0.3"
defaultConfig {
minSdkVersion 15
targetSdkVersion 26
versionCode 3
versionName "1.0.0.0"
applicationId "com.xxx.app"
// Enabling multidex support.
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
arguments = ["resourcePackageName": android.defaultConfig.applicationId]
}
}
}
signingConfigs {
releaseSigning {
///
}
}
buildTypes {
debug {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
release {
// proguard
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
shrinkResources false
zipAlignEnabled true
signingConfig signingConfigs.releaseSigning
}
}
flavorDimensions "tier"
productFlavors {
dev {
buildConfigField "String", "SERVICE_URL_BASE", "\"dev.xxx.com/xxx-rest\""
applicationId "development.xxx.app"
}
coll {
buildConfigField "String", "SERVICE_URL_BASE", "\"dev.xxx.com/xxx-rest\""
applicationId "test.xxx.app"
}
prod {
buildConfigField "String", "SERVICE_URL_BASE", "\"www.xxx.com/xxx-rest\""
applicationId "com.xxx.app"
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
dexOptions {
javaMaxHeapSize "4g"
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation project(path: ':shareLib', configuration: 'default')
// implementation project(path: ':shareLib', configuration: 'default') {
// exclude module: 'jsr305'
// }
// compile fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.squareup:otto:1.3.8'
implementation 'org.springframework.android:spring-android-rest-template:2.0.0.M3'
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
implementation "org.androidannotations:androidannotations-api:$AAVersion"
annotationProcessor "org.androidannotations:rest-spring:$AAVersion"
implementation "org.androidannotations:rest-spring-api:$AAVersion"
annotationProcessor "org.androidannotations:otto:$AAVersion"
implementation "org.androidannotations:otto:$AAVersion"
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
// support AA on Android < 5
// compile 'com.android.support:multidex:1.0.1'
implementation 'com.github.markomilos:paginate:0.5.1'
// mpandroid
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.0-beta1'
// crashlytics fabric
implementation('com.crashlytics.sdk.android:crashlytics:2.6.1#aar') {
transitive = true
}
// recaptcha
implementation ('android.lib.recaptcha:reCAPTCHA:2.0.0') {
exclude group: 'com.android.support'
}
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.0'
}
I have solved opening modules project one by one and doing this for each one:
Project Structure -> Project -> Gradle Version = 4.7
Settings -> Build, Execution, Deployment -> Compiler -> Uncheck "Configure on demand"
Rebuild project once you can see your .aar file into build/outputs/aar
Then repeat these steps for main project module
As per this answer and this answer I already make changes in app gradle but still it is showing me following error while building my application.
Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
What am I missing here?
Here is my App 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'
apply plugin: 'realm-android'
//project.ext.versionInfo.releaseVersionName = SYNCED_VERSION_NAME
android {
compileSdkVersion 23
flavorDimensions "default"
defaultConfig {
applicationId "in.something"
minSdkVersion 15
targetSdkVersion 23
versionCode 13
versionName "1.10"
multiDexEnabled true
}
productFlavors {
LIVE_BETA {
applicationIdSuffix ".beta"
resValue "string", "app_display_name", "Something(B)"
resValue "string", "SERVER_URL", "http://something/beta"
}
LIVE {
resValue "string", "app_display_name", "something"
resValue "string", "SERVER_URL", "http://something/live"
}
DEV {
applicationIdSuffix ".dev"
resValue "string", "app_display_name", "something(D)"
resValue "string", "SERVER_URL", "http://localhost/"
}
}
buildTypes {
debug {
// applicationIdSuffix "
// .debug"
// versionNameSuffix "-debug"
}
release {
//minifyEnabled true
//shrinkResources true
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
// Rename APK files
// applicationVariants.all { variant ->
// def output = variant.outputs.get(0)
// File apk = output.outputFile
// String newName = output.outputFile.name.replace(".apk", "-${variant.mergedFlavor.versionCode}-${variant.mergedFlavor.versionName}-.apk")
// .replace("app-", "${variant.mergedFlavor.applicationId}-")
// output.outputFile = new File(apk.parentFile, newName)
// }
}
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
//================== Local ========================/
implementation fileTree(include: ['*.jar'], dir: 'libs')
//compile files('libs/ksoap2-android-assembly-3.1.1-jar-with-dependencies.jar')
/** *************************************************/
//================== Default ========================/
implementation 'com.android.support:appcompat-v7:23.1.0'
implementation 'com.android.support:recyclerview-v7:23.1.0'
implementation 'com.android.support:design:23.1.0'
implementation 'com.android.support:cardview-v7:23.1.0'
/** *************************************************/
implementation 'com.fasterxml.jackson.core:jackson-databind:2.6.3'
implementation 'com.fasterxml.jackson.core:jackson-core:2.6.3'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.6.3'
//implementation files('libs/bouncycastle-java5-136-1.0.0.jar')
implementation 'com.joanzapata.iconify:android-iconify-fontawesome:2.1.1'
/************ Location *****************/
implementation 'com.google.android.gms:play-services-location:8.3.0'
/** *************************************************/
/************ Common *****************/
implementation 'commons-io:commons-io:2.4'
implementation 'commons-codec:commons-codec:1.4'
/** ********************************/
implementation('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
implementation files('libs/bouncycastle-java5-136-1.0.0.jar')
}
I am using Android Studio 3.0 and gradle version is 3.0
And add below your
classpath 'io.fabric.tools:gradle:1.+'
definition
classpath "io.realm:realm-gradle-plugin:4.1.1"
For me it looks like it was upgrading Realm from
classpath "io.realm:realm-gradle-plugin:1.0.0"
to
classpath "io.realm:realm-gradle-plugin:4.1.1"
I'm unable to run the project in Canary 6 and Canary 7.
Gradle build succeeded.
At compile time it didn't show any errors.
At runtime its showing errors with all library classes(gradle dependency, jar dependency).
Some of them are,
error: package retrofit2 does not exist
error: package android.support.v7.app does not exist
error: package com.google.gson does not exist.
Error: Note: #BindView field with unresolved type (PercentRelativeLayout) must elsewhere be generated as a View or interface.
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
top build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha7'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
core build.gradle:
apply plugin: 'com.android.library'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:26.0.0-beta2'
implementation 'com.android.support:percent:26.0.0-beta2'
implementation "com.android.support:support-core-utils:26.0.0-beta2"
implementation 'com.squareup.retrofit2:retrofit:2.0.2'
implementation 'com.squareup.picasso:picasso:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
implementation 'com.squareup.okhttp3:logging-interceptor:3.2.0'
implementation 'com.intuit.sdp:sdp-android:1.0.3'
implementation 'uk.co.chrisjenx:calligraphy:2.2.0'
implementation 'com.google.code.gson:gson:2.2.4'
implementation 'com.android.support:design:26.0.0-beta2'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
}
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' }
}
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.msf.phillip"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
flavorDimensions "uat"
productFlavors {
fullUAT {
dimension "uat"
versionName "1.37.2.0"
resValue 'string', 'APP_NAME', '"Poems SG 2.0"'
buildConfigField "String", "VERSION", "\"1.2.2.0\""
buildConfigField "String", "connection_env", "\"uat\""
buildConfigField "String", "connection_url", "*******"
buildConfigField "String", "API_KEY", "************"
buildConfigField "boolean", "mandatoryUpdate", "false"
buildConfigField "String", "FLURRY_API_KEY", "*************"
}
fullRelease {
dimension "uat"
versionName "1.0.4.0"
resValue 'string', 'APP_NAME', '"Poems"'
buildConfigField "boolean", "isUAT", "false"
buildConfigField "boolean", "isInternal", "false"
buildConfigField "String", "VERSION", "\"1.0.0\""
buildConfigField "String", "connection_env", "\"prod\""
buildConfigField "String", "connection_url", "*************"
buildConfigField "String", "API_KEY", "**************"
buildConfigField "boolean", "mandatoryUpdate", "false"
buildConfigField "String", "FLURRY_API_KEY", "************"
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation project(path: ':core')
implementation 'com.android.support:appcompat-v7:26.0.0-beta2'
implementation 'com.google.android.gms:play-services-gcm:11.0.2'
implementation 'com.android.support:multidex:1.0.1'
implementation 'com.flurry.android:analytics:7.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
implementation 'com.jakewharton:butterknife:8.6.0'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
}
apply plugin: 'com.google.gms.google-services'
I've just updated my android gradle plugin from 0.12 to 0.13. Moreover I've downloaded gradle 2.1. Then, I tried with android studio 0.8.9 in beta but according http://tools.android.com/tech-docs/new-build-system/version-compatibility I have to use at least android studio 0.8.11 (canary channel). So I've updated my android studio but I have still the problem.
For now, I have to use gradle 1.10 and android gradle plugin 0.12.+ to work
Here the error from AS
Error:No such property: projectDependencies for class: com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated
Edit :
Here is my build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
// works with 0.12.+ (not with 0.13.+)
classpath 'com.android.tools.build:gradle:0.12.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// The latest version of the android-apt plugin
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.3'
}
}
allprojects {
repositories {
maven { // For Android-ViewPagerIndicator
url "http://dl.bintray.com/populov/maven"
}
jcenter()
mavenCentral()
maven {
url "http://JRAF.org/static/maven/2"
}
}
}
Here is my gradle-wrapper.properties
#Fri Sep 19 17:50:42 CEST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
# use gradle-2.1-all.zip with android gradle plugin 0.13
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
EDIT 2 :
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion 19
buildToolsVersion "20.0.0"
defaultConfig {
applicationId 'xxx'
minSdkVersion 10
targetSdkVersion 19
versionCode xxx
versionName 'xxx'
}
// For more information see
// #link http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Using-sourceCompatibility-1.7
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
signingConfigs {
debug {
storeFile file('../../KeyStore/debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
storeFile file('xxx')
storePassword 'xxx'
keyAlias 'xxx'
keyPassword 'xxx'
}
}
buildTypes {
// Just intern. This is alpha build
debug {
buildConfigField "boolean", "FORCE_GOOG_GEO_API", "false" // can be set to true in debug but not in other buildTypes
buildConfigField "boolean", "ENABLE_LOG", "true"
buildConfigField "String", "HOST", "\"xxx\""
versionNameSuffix '-alpha'
signingConfig signingConfigs.debug
zipAlign true
}
// For customer
recette {
buildConfigField "boolean", "FORCE_GOOG_GEO_API", "false"
buildConfigField "boolean", "ENABLE_LOG", "false"
buildConfigField "String", "HOST", "\"xxx\""
versionNameSuffix '-recette'
signingConfig signingConfigs.debug
zipAlign true
}
// PreProd
preprod {
buildConfigField "boolean", "FORCE_GOOG_GEO_API", "false"
buildConfigField "boolean", "ENABLE_LOG", "false"
buildConfigField "String", "HOST", "\"xxx\""
signingConfig signingConfigs.debug
zipAlign true
}
// Prod
release {
buildConfigField "boolean", "FORCE_GOOG_GEO_API", "false"
buildConfigField "boolean", "ENABLE_LOG", "false"
buildConfigField "String", "HOST", "\"xxx\""
signingConfig signingConfigs.release
zipAlign true
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
// This is important, it will run lint checks but won't abort build
lintOptions {
abortOnError false
disable 'MissingTranslation'
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'AndroidManifest.xml'
}
}
apt {
arguments {
resourcePackageName android.defaultConfig.packageName
androidManifestFile variant.processResources.manifestFile
}
}
def GoogPlayServVersion = '5.0.+';
def GsonVersion = '2.2.4';
def LibPhoneNumbVersion = '5.9';
def GreenRobotVersion = '2.2.1';
def OkHttpVersion = '2.0.0';
def OkHttpConnVersion = '2.0.0';
def JacksonCore = '2.4.1';
def JacksonDatabind = '2.4.1';
def JacksonAnnotations = '2.4.0';
def SwitchVersion = '1.3.1';
def CroutonVersion = '1.8.4';
def ActionBarSherlockVersion = '4.4.0';
def ViewpagerIndicatorVersion = '2.4.1';
def PicassoVersion = '2.3.4';
def RoboSpiceVersion = '1.4.12';
def StickyListHeaders = '2.4.1';
def AAVersion = '3.1';
def RobotiumVersion = '5.2.1';
dependencies {
// Include all jar in libs folder
compile fileTree(dir: 'libs', include: ['*.jar'])
// Google Play Services
compile "com.google.android.gms:play-services:$GoogPlayServVersion"
// Gson
compile "com.google.code.gson:gson:$GsonVersion"
// LibphoneNumber
compile "com.googlecode.libphonenumber:libphonenumber:$LibPhoneNumbVersion"
// GreenRobot
compile "de.greenrobot:eventbus:$GreenRobotVersion"
// OkHttp [We use repackaged version #see https://github.com/square/okhttp/issues/967]
// compile "com.squareup.okhttp:okhttp:$OkHttpVersion"
// compile "com.squareup.okhttp:okhttp-urlconnection:$OkHttpConnVersion"
// Jackson
compile "com.fasterxml.jackson.core:jackson-core:$JacksonCore"
compile "com.fasterxml.jackson.core:jackson-databind:$JacksonDatabind"
compile "com.fasterxml.jackson.core:jackson-annotations:$JacksonAnnotations"
// Switch backport
compile "org.jraf:android-switch-backport:$SwitchVersion"
// Crouton lib
compile("de.keyboardsurfer.android.widget:crouton:$CroutonVersion") {
// exclusion is not neccessary, but generally a good idea.
exclude group: 'com.google.android', module: 'support-v4'
}
// You must install or update the Support Repository through the SDK manager to use this dependency.
// The Support Repository (separate from the corresponding library) can be found in the Extras category.
// compile 'com.android.support:support-v4:19.1.0'
// compile 'com.android.support:gridlayout-v7:19.1.0'
// ActionBarSherlock
compile "com.actionbarsherlock:actionbarsherlock:$ActionBarSherlockVersion#aar"
// Android-ViewPagerIndicator
compile "com.viewpagerindicator:library:$ViewpagerIndicatorVersion#aar"
// Picasso
compile "com.squareup.picasso:picasso:$PicassoVersion"
// Robospice
compile "com.octo.android.robospice:robospice:$RoboSpiceVersion"
// StickyList headers
compile "se.emilsjolander:stickylistheaders:$StickyListHeaders"
// Facebook sdk
compile 'fr.avianey:facebook-android-api:+#aar'
// android annotations
compile "org.androidannotations:androidannotations-api:$AAVersion"
apt "org.androidannotations:androidannotations:$AAVersion"
compile 'com.sothree.slidinguppanel:library:+'
// Tests part
androidTestCompile "com.jayway.android.robotium:robotium-solo:$RobotiumVersion"
compile "com.jayway.android.robotium:robotium-solo:$RobotiumVersion"
}
Do you know how can I solve this ?
Thx
android-apt 1.3 doesn't seem to be compatible with v0.13 of the Android Gradle plugin. Please use android-apt 1.4 instead:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.13.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}