Tag: android studio

[Q&A] how to use android annotations in gradle

build.gradle

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
buildscript {
    repositories {
        mavenCentral()
    }
 
    dependencies {
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
    }
}
 
repositories {
    mavenCentral()
    mavenLocal()
}
 
apply plugin: 'android-apt'
 
def AAVersion = '3.3.2'
 
apt {
    arguments {
        androidManifestFile variant.outputs[0].processResources.manifestFile
    }
}
 
dependencies {
    apt "org.androidannotations:androidannotations:$AAVersion"
    compile "org.androidannotations:androidannotations-api:$AAVersion"
}
Tags : ,

[Q&A] How to solve java.lang.OutOfMemoryError: GC overhead limit exceeded error in android studio

in build.gradle

1
2
3
4
5
6
android {
...
   dexOptions {
      javaMaxHeapSize "2g"
   }
}
Tags :

[Q&A] How to solve “Gradle project sync failed. Please fix your project and try again”

1
File -> Invalidate caches / Restart
Tags : ,