Well i am implementing actionbar pull refresh library into my demotool project
i follow this link and at last i am already at finish line
my code error is
Gradle 'demotool' project refresh failed: No such property: GROUP for class: org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer
Implementing ActionBar-PulltoRefresh by Chris Banes, libary errors etc
but i am getting this error which i cant find on google because no one have this error
i will first give you my project structure
[demotool]
|-> settings.gradle
include ':app',':actionbarsherlock',':pulltorefresh'
|
|-> build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.8.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
|
|-> pulltorefresh
|-> build.gradle
apply plugin: 'android-library'
dependencies {
compile 'com.github.castorflex.smoothprogressbar:library:0.2.0'
}
android {
compileSdkVersion 14
buildToolsVersion "19.0.0"
defaultConfig {
// This should be 14, but is 7 because extra-abc/extra-abs depend on this library
minSdkVersion 14
targetSdkVersion 19
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
|
|-> actionbarsherlock
|-> build.gradle
apply plugin: 'android-library'
dependencies {
compile files('actionbarsherlock/android-support-v4.jar')
compile ("com.actionbarsherlock:actionbarsherlock:[4.4,)#aar") {
// Need to specifically exclude this as it is specified in ActionBarSherlock pom
exclude group: 'com.google.android', module: 'support-v4'
}
}
android {
compileSdkVersion 14
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
|-> demotool(app)
|-> build.gradle
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(":actionbarsherlock")
compile project(":pulltorefresh")
}
what is this error and why i am getting this.
and tell me if this structure is OK?
and yes sometimes i get default configuration error too
thanks in advance
PullToRefresh/build.gradle applies the gradle-mvn-push.gradle plugin, but in your project you don't need/want that. If you comment out the line:
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
your project should build successfully.
Your gradle.properties seems to be missing a GROUP property, which is required by gradle-mvn-push.gradle (see its GitHub page).
The original source code has gradle.properties file which contains values for all the properties you need to copy that too...
Related
I am moving a project from an older Gradle version where it worked fine to the current and have just been running into one issue after another. Most I have googled but have just hit a wall on this one.
Error:(20, 0) Could not get unknown property 'cppFlags' for object of type com.android.build.gradle.internal.dsl.NdkOptions.
It is the cppFlag.add section below for NDK
I have a feeling it has something to do with NDK or CMake or something like that however I'm stumped and not really a Gradle guy.
I have not posted the application gradle only because it is fairly large but can do if needed.
Would greatly appreciate some help on this.
Thanks
Module Gradle
apply plugin: 'com.android.library'
def basedir = projectDir.absolutePath
android {
compileSdkVersion=26
buildToolsVersion="27.0.3"
defaultConfig {
minSdkVersion 26
targetSdkVersion 26
versionCode 1
versionName "1.0"
ndk {
moduleName "biocore"
stl = "gnustl_shared"
cppFlags.add("-std=c++11")
cppFlags.add("-frtti")
cppFlags.add("-fexceptions")
cppFlags.add("-I${basedir}/src/main/headers".toString())
cppFlags.add("-iquote${basedir}/src/main/jni".toString())
ldLibs.addAll(["android","log","atomic","z"])
}
}
}
android.productFlavors {
create("armv7") {
ndk.abiFilters.add("armeabi-v7a")
String libsDir = "${basedir}/src/main/jniLibs/armeabi-v7a/"
ndk.ldLibs.addAll([
libsDir + "libopencv_legacy.a",
libsDir + "libopencv_calib3d.a",
libsDir + "libopencv_features2d.a",
libsDir + "libopencv_flann.a",
libsDir + "libopencv_imgproc.a",
libsDir + "libopencv_highgui.a",
libsDir + "libopencv_contrib.a",
libsDir + "libopencv_objdetect.a",
libsDir + "libopencv_core.a",
libsDir + "libtbb.a",
libsDir + "liblibtiff.a",
libsDir + "liblibpng.a",
libsDir + "liblibjpeg.a",
libsDir + "liblibjasper.a",
libsDir + "libIlmImf.a",
])
}
}
android.compileOptions.with {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
android.dependencies {
compile 'com.android.support:appcompat-v7:26.1.0'
}
Project Gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
maven { url "https://maven.google.com" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// classpath 'com.android.tools.build:gradle-experimental:0.11.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
google()
}
}
UPDATE
Per Michaels suggestion (if I understand it correctly) I altered as follows ;
ndk {
moduleName "biocore"
stl="gnustl_shared"
}
externalNativeBuild{
cmake {
cppFlags.add("-std=c++11")
cppFlags.add("-frtti")
cppFlags.add("-fexceptions")
cppFlags.add("-I${basedir}/src/main/headers".toString())
cppFlags.add("-iquote${basedir}/src/main/jni".toString())
ldLibs.addAll(["android", "log", "atomic", "z"])
}
}
}
}
Now I am seeing a similar issue - unknown property 'ldLibs'
I tried moving that line to the ndk{ block but get the same message.
If I comment it out ( ldLids.addAll ) it then falls over in the productFlavors block at ndk.abiFilters with that same message - unknown property
With help from #Michael I have it sorted.
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
externalNativeBuild {
cmake {
cppFlags "-fexceptions"
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ndk {
abiFilters "armeabi-v7a"
}
}
debug {
ndk {
abiFilters "armeabi-v7a"
}
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
You started with the experimental gradle plugin. This was meant to provide build settings for C++ libraries in gradle. This plugin is facing end-of-life (see teh link for detailed excuses). These days, Google provides external native build tools instead, and they recommend cmake over ndkBuild.
This means that all flags and configurations should be handled in CMakeLists.txt, with exception of very few parameters that can fine tune the build for different flavors, or gradle configuration.
after migrating to Android 3.0 I've changed gradle configurations in my projects.
In one of them I get errors while trying to do the build:
Execution failed for task ':app:compileDebugKotlin'.
e: C:\dev\myapp\app\src\main\kotlin\com\xxxxx\dialog\DeleteConfirmDialog.kt: (35, 46): Too many arguments for public constructor Builder(p0: Context!) defined in android.app.AlertDialog.Builder
e: C:\dev\myapp\app\src\main\kotlin\com\xxxxx\dialog\HumidityThresholdDialog.kt: (46, 74): Too many arguments for public open fun getString(p0: String!): String! defined in android.os.Bundle
e: C:\dev\myapp\app\src\main\kotlin\com\xxxxx\dialog\PermissionDialog.kt: (45, 50): Unresolved reference: ACTION_APcomICATION_DETAILS_SETTINGS
e: C:\dev\myapp\app\src\main\kotlin\com\xxxxx\dialog\PermissionDialog.kt: (53, 22): Unresolved reference: finishAffinity
e: C:\dev\myapp\app\src\main\kotlin\com\xxxxx\dialog\TemperatureThresholdDialog.kt: (74, 73): Unresolved reference: holo_red_dark
e: C:\dev\myapp\app\src\main\kotlin\com\xxxxx\dialog\TemperatureThresholdDialog.kt: (81, 88): Unresolved reference: holo_red_dark
e: C:\dev\myapp\app\src\main\kotlin\com\xxxxx\fragment\Thresholds.kt: (128, 41): Unresolved reference: fragmentManager
e: C:\dev\myapp\app\src\main\kotlin\com\xxxxx\fragment\Thresholds.kt: (153, 38): Unresolved reference: fragmentManager
...
What is interesting, when I navigate to error lines, eg:
val color = if (it) android.R.color.black else android.R.color.holo_red_dark //Unresolved reference: holo_red_dark
dialog.show(activity.fragmentManager, ThresholdDialog::class.java.simpleName) //Unresolved reference: fragmentManager
the compiler doesn't show an error and I can navigate to those classes.
Project:
buildscript {
repositories {
google()
jcenter()
maven { url 'https://raw.github.com/vRallev/mvn-repo/master/' }
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1' //<--- when reverting back to 2.3.3, the project is built without problems
classpath 'io.fabric.tools:gradle:1.23.0'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
}
App:
buildscript {
ext.versions = [
kotlin : '1.1.60',
crashlytics: '1.16.0'
]
repositories {
mavenCentral()
maven { url 'http://download.crashlytics.com/maven' }
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath "com.crashlytics.tools.gradle:crashlytics-gradle:$versions.crashlytics"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$versions.kotlin"
classpath "org.kordamp:markdown-gradle-plugin:1.1.0"
classpath 'io.fabric.tools:gradle:1.23.0'
}
}
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://jitpack.io' }
mavenLocal()
mavenCentral()
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'org.kordamp.markdown.convert'
apply from: 'signing.gradle'
def version = ["major": 3, "minor": 6, "patch": 1, "build": 0]
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.xxxxx"
minSdkVersion 19
targetSdkVersion 26
versionCode 10000000 * version["major"] + 100000 * version["minor"] + 1000 * version["patch"] + version["build"]
versionName "${version["major"]}.${version["minor"]}.${version["patch"]}"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7 //<- tried to changed to 1_8 with android studio 3, doesn't help
targetCompatibility JavaVersion.VERSION_1_7
}
signingConfigs {
release
}
buildTypes {
release {
// runProguard false
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
signingConfig signingConfigs.release
}
debug {
ext.enableCrashlytics = false
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
main.assets.srcDirs += 'build/gen-html'
androidTest.java.srcDirs += 'src/androidTest/kotlin'
}
lintOptions {
checkReleaseBuilds false
disable 'InvalidPackage'
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/LICENSE.txt'
}
}
ext.versions += [
supportLib : "26.1.0",
logback : '1.1.1-2',
dagger : '1.2.5',
butterknife: '7.0.1'
]
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) //changed all 'compile' to 'implementation', doesn't help
compile 'com.xxxxx.lib:1.0.1-SNAPSHOT#aar'
compile "com.android.support:support-v4:$versions.supportLib"
compile "com.android.support:support-v13:$versions.supportLib"
compile "com.squareup.dagger:dagger:$versions.dagger"
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta3'
compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta3'
compile 'com.google.guava:guava:20.0'
compile 'de.greenrobot:eventbus:2.2.1'
compile 'org.slf4j:slf4j-api:1.7.6'
compile "com.github.tony19:logback-android-core:$versions.logback"
compile "com.github.tony19:logback-android-classic:$versions.logback"
compile "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlin"
compile 'io.reactivex:rxjava:1.0.16'
compile 'io.reactivex:rxkotlin:0.40.1'
compile "com.jakewharton.rxbinding:rxbinding:0.4.0"
compile "com.jakewharton.rxbinding:rxbinding-kotlin:0.4.0"
compile "com.jakewharton:butterknife:$versions.butterknife"
compile 'com.jakewharton.threetenabp:threetenabp:1.0.3'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') { transitive = true }
compile 'com.github.PhilJay:MPAndroidChart:v2.0.7'
kapt "com.jakewharton:butterknife:$versions.butterknife"
kapt "com.squareup.dagger:dagger-compiler:$versions.dagger"
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.9.0'
testCompile 'org.assertj:assertj-core:3.8.0'
}
markdownToHtml {
sourceDir = file('src/main/markdown')
fencedCodeBlocks = true
hardwraps = true
autoLinks = true
}
project.afterEvaluate {
tasks.findByName('mergeDebugAssets')?.dependsOn tasks['markdownToHtml']
tasks.findByName('mergeReleaseAssets')?.dependsOn tasks['markdownToHtml']
}
What could be the issue?
I took a look at dependency tree and noticed that logback library was using an old android library which was pulled by gradle form repository and strangely used to compile the project.
+--- com.github.tony19:logback-android-classic:1.1.1-2
| +--- com.github.tony19:apktool-lib:1.4.4-3
| | \--- com.google.android:android:2.1_r1
After excluding it from gradle dependency the project started to build properly.
implementation('com.github.tony19:logback-android-classic:1.1.1-6') {
exclude group: 'com.google.android', module: 'android'
}
.lang.NoSuchFieldError: No static field colorBackgroundFloating
this is my gradle file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
}
}
apply(plugin: 'com.android.application')
repositories {
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.kdu.routeP.app"
minSdkVersion 18
targetSdkVersion 23
versionCode 7
versionName "1.0.6"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
dexOptions {
javaMaxHeapSize "4g"
}
}
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
disable 'InvalidPackage'
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
// Crappy workaround to gradle build error when running instrumentation tests
// See: http://stackoverflow.com/questions/20827885/android-studio-0-4-duplicate-files-copied-in-apk-meta-inf-license-txt
exclude 'LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.android.support:support-annotations:23.0.1'
compile 'com.google.maps.android:android-maps-utils:0.4'
compile 'com.afollestad.material-dialogs:core:0.9.1.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
compile 'com.yqritc:recyclerview-flexibledivider:1.2.5'
compile 'com.beardedhen:androidbootstrap:1.2.3'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2') {
// Necessary if your app targets Marshmallow (since Espresso
// hasn't moved to Marshmallow yet)
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile('com.android.support.test:runner:0.3') {
// Necessary if your app targets Marshmallow (since the test runner
// hasn't moved to Marshmallow yet)
exclude group: 'com.android.support', module: 'support-annotations'
}
compile 'com.google.android.gms:play-services:10.0.1'
}
sometimes I change the support library to 23.1.1 it works,but when it comes to the tabbed view it not working, and when I checked the external libraries it has the support 25.0.0
I meet a problem when trying to build Telegram Source Code in Android Studio (https://github.com/DrKLO/Telegram).
I have installed NDK, CMake, LLDB.
But I got this error:
"Gradle sync failed: Could not find method externalNativeBuild()"
Here is my build.gradle:
apply plugin: 'com.android.application'
repositories {
mavenCentral()
}
configurations {
compile.exclude module: 'support-v4'
}
dependencies {
compile 'com.google.android.gms:play-services-gcm:9.6.1'
compile 'com.google.android.gms:play-services-maps:9.6.1'
compile 'com.google.android.gms:play-services-vision:9.6.1'
compile 'com.android.support:support-core-ui:24.2.1'
compile 'com.android.support:support-compat:24.2.1'
compile 'com.android.support:support-core-utils:24.2.1'
compile 'net.hockeyapp.android:HockeySDK:4.0.1'
compile 'com.googlecode.mp4parser:isoparser:1.0.6'
}
android {
compileSdkVersion 24
buildToolsVersion '24.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig.applicationId = "org.telegram.messenger"
sourceSets.main.jniLibs.srcDirs = ['./jni/']
externalNativeBuild {
ndkBuild {
path "/jni/Android.mk"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
signingConfigs {
debug {
storeFile file("config/release.keystore")
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
release {
storeFile file("config/release.keystore")
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
buildTypes {
debug {
debuggable true
jniDebuggable true
signingConfig signingConfigs.debug
applicationIdSuffix ".beta"
}
release {
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
foss {
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
}
}
defaultConfig.versionCode = 851
sourceSets.debug {
manifest.srcFile 'config/debug/AndroidManifest.xml'
}
sourceSets.release {
manifest.srcFile 'config/release/AndroidManifest.xml'
}
sourceSets.foss {
manifest.srcFile 'config/foss/AndroidManifest.xml'
}
productFlavors {
x86 {
ndk {
abiFilter "x86"
}
versionCode = 2
}
armv7 {
ndk {
abiFilter "armeabi-v7a"
}
versionCode = 1
}
fat {
versionCode = 3
}
}
applicationVariants.all { variant ->
def abiVersion = variant.productFlavors.get(0).versionCode
variant.mergedFlavor.versionCode = defaultConfig.versionCode * 10 + abiVersion;
}
defaultConfig {
minSdkVersion 14
targetSdkVersion 24
versionName "3.13.1"
externalNativeBuild { ndkBuild {
arguments "NDK_APPLICATION_MK:=jni/Application.mk", "APP_PLATFORM:=android-14"
abiFilters "armeabi-v7a", "x86"
}
}
}
}
apply plugin: 'com.google.gms.google-services'
It seems the Gradle has not linked to exist C++ library yet.
But, I didn't know how I manual link Gradle to exist Android.mk.
Any ideas?
A few guesses:
Make sure you are using ndk-r12 or ndk-r13 (check your local.properties file). After you change ndk version, rm -fr TMessagesProj/.externalNativeBuild [this is needed for current android studio]
The only connection between gradle and native code is your top level Android.mk which is there already, just change its path to 'jni/Android.mk' [it needs to be relative path to your $project/build.gradle file.
maybe jniLibs.srcDirs line in your build.gradle is not needed: the shared lib will be automatically packed into APK, unless you have other purposes. The built native libs are not saved there
I did have cmake installed, not sure that matters. https://developer.android.com/studio/projects/add-native-code.html. Your project could build with my fake json file, so your system should be pretty close.
I get the following error, while compiling / building my app with AndroidStudio 1.4:
Error:Execution failed for task ':app:processDebugResources'.>
com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command
'/home/pepperonas/Android/Sdk/build-tools/23.0.2/aapt'' finished with
non-zero exit value 1
Who knows what causes this issue? I spent a lot of time trying different gradle versions and configurations, but the error is raised again.
This is how my gradle looks like:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
apply plugin: 'com.android.application'
repositories {
jcenter()
flatDir { dirs 'libs' }
maven { url "https://jitpack.io" }
maven { url "http://dl.bintray.com/amulyakhare/maven" }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
defaultConfig {
applicationId "com.pepperonas.teds"
minSdkVersion 16
targetSdkVersion 23
versionCode 19
versionName "0.2.9b"
multiDexEnabled true
project.ext.set("archivesBaseName", "teds");
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def fileName = outputFile.name.replace(".apk", "-" + defaultConfig.versionName + ".apk");
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/pass-v1.1.1.jar')
compile files('libs/sdk-v1.0.0.jar')
compile(name: 'aesprefs-0.0.5', ext: 'aar')
compile(name: 'andcommon-0.0.5', ext: 'aar')
compile 'com.android.support:multidex:1.0.1'
compile('com.afollestad.material-dialogs:core:0.8.0.1#aar') {
transitive = true
}
compile('com.afollestad.material-dialogs:commons:0.8.0.1#aar') {
transitive = true
}
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.google.android.gms:play-services-ads:8.3.0'
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.mikepenz:iconics-core:1.7.6#aar'
compile 'com.mikepenz:google-material-typeface:1.2.0.1#aar'
compile 'com.mikepenz:fontawesome-typeface:4.4.0.1#aar'
compile 'com.mikepenz:octicons-typeface:3.0.0.1#aar'
compile 'com.mikepenz:community-material-typeface:1.2.64.1#aar'
compile 'com.melnykov:floatingactionbutton:1.2.0'
compile 'com.github.clans:fab:1.6.1'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
}
Got it. The issue comes from the two FAB-libraries I added to the project.
compile 'com.melnykov:floatingactionbutton:1.2.0'
compile 'com.github.clans:fab:1.6.1'
I guess some resources are named the same ("duplicate").