Gluon Mobile: using ExoPlayer - android

I am working on an android app with GluonMobile. For one feature I need a ExoPlayer.
So I included the dependency com.google.android.exoplayer:exoplayer:+ .
It seems that the dependecy is an aar -file and InteliJ could not find any of ExoPlayers classes.
Here my buildscript:
buildscript {
repositories {
mavenCentral()
jcenter()
google()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:+'
classpath 'com.github.jengelman.gradle.plugins:shadow:+'
}
}
apply plugin: 'org.javafxports.jfxmobile'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
apply plugin: 'idea'
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
repositories {
mavenCentral()
jcenter()
google()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
maven {
url uri('libs')
}
}
mainClassName = '[...].main.Main'
version = '2.0_Alpha'
dependencies {
compile "com.gluonhq:charm:+"
compile "com.gluonhq:glisten-afterburner:+"
compile "com.google.apis:google-api-services-youtube:+"
compile "com.google.api-client:google-api-client-java6:+"
compile "com.google.oauth-client:google-oauth-client-jetty:+"
compile "com.google.code.gson:gson:+"
compileOnly 'lib.idea:annotations:0'
androidImplementation "org.javafxports:jfxdvk:+"
androidImplementation 'com.google.android.exoplayer:exoplayer:+#aar'
}
jfxmobile {
downConfig {
version = '+'
// Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
//noinspection GroovyAssignabilityCheck
plugins 'browser', 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
manifest = 'src/android/AndroidManifest.xml'
//androidSdk = "${ANDROID_HOME}"
compileSdkVersion = 28
targetSdkVersion = 22
minSdkVersion = 16
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'
}
}
}
task installApk{
group = "gluon mobile for android"
doLast{
exec {
workingDir "${ANDROID_HOME}\\platform-tools"
commandLine "${workingDir}\\adb.exe", "install", "${buildDir}/javafxports/android/YouJavaTubeApp.apk"
}
}
}
I found already something about explodeAarDependencies(...) but it did not work. So have somebody any ideas how to include (any) aar dependencies to my GluonMobile project.
Thank you for your help.

You are on the right track about explodeAarDependencies, this is the task used by the jfxmobile plugin to unpack .aar dependencies into .jar and other resources.
You can find about the task here.
How to use it:
In your build.gradle file, include the dependency:
dependencies {
...
androidCompile 'com.google.android.exoplayer:exoplayer:2.9.0'
}
Note 1: don't to use #aar
Note 2: the jfxmobile plugin uses some defined configurations like androidCompile instead of androidImplementation.
Note 3: I'd rather use the given version, not +.
And at the end of the file, add the task:
project.afterEvaluate {
explodeAarDependencies(project.configurations.androidCompile)
}
And that's it.
Save and apply/sync/reload the build and you should see exoplayer and a bunch of transitive dependencies included into the Android compile dependencies, both .aar and .jar files.

I think you are adding dependencies in the wrong gradle file.
There will be 2 gradle files , One for project level and for app level. you need to add your libraries dependencies in app level gradle.
whereas you might be adding in the project level gradle.
My Gradle file looks like this :
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.3"
defaultConfig {
applicationId "my.application.id"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.google.android.exoplayer:exoplayer:2.9.0'
}
For more details on adding exoplayer pls refer to
Github and
https://developer.android.com/guide/topics/media/exoplayer

Related

Could not find method implementation() for arguments [com.google.android:support-v4:r7]

I'm a total Android / Java newbie, and came across a project I want to compile below:
https://github.com/maxamillion32/Android-Firebase-mapping
It is a bit old and maybe that's why it's causing me issues.
First error I got about Build Tools 24.0.1, which I downloaded. Now I get the following error which I cannot resolve:
Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method implementation() for arguments [com.google.android:support-v4:r7] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
I've checked my Dependencies in File>Project Structure and com.google.android:support-v4:r7 is there.
build.gradle (Project)
// 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.6.3'
classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle (app)
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.mimming.hacks.starter"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
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 'com.android.support:appcompat-v7:23.4.0'
implementation 'com.google.android.gms:play-services:9.6.1'
testImplementation 'junit:junit:4.12'
// compile 'com.firebase:firebase-client-android:2.5.2+'
apply plugin: 'com.google.gms.google-services'
implementation 'com.google.firebase:firebase-database:9.6.1'
}
Any ideas?
Thank you!
The gradle version used seems to be of lower version, in-order to use implementation gradle version should be above 3
You should replace your dependencies in build.gradle to latest version.
classpath 'com.android.tools.build:gradle:3.6.3'
Also you will have to upgrade the distributionUrl also
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
As you already mentioned you have updated the buildToolsVersion, this should work fine and also make sure all the dependencies are using implementation and not compileas compile is deprecated.

Gradle duplicate entry error: META-INF/MANIFEST.MF (Or how to delete a file from jar)

I've cloned a github repository because I wanted to study the code, but when I tried to build it in Android Studio, I ran into some trouble.
After adding the google maven repository (as prompted by Android Studio) and updating both the Gradle Plugin Version and the Grade Version (to 3.5.2 and to 5.4.1, respectively), the build fails because of the following error:
Cause: duplicate entry: META-INF/MANIFEST.MF
And this, to be more specific:
Caused by: java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF
Here is my project level build.gradle file:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
// 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'
}
}
}
Here's my module build.gradle file (before trying anything):
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.thelittlenaruto.supportdesignexample"
minSdkVersion 11
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation ('com.android.support:appcompat-v7:22.2.1')
implementation ('com.android.support:design:22.2.1')
implementation 'com.github.frankiesardo:linearlistview:1.0.1#aar'
}
Here's what I've tried so far:
Adding the following to the android section of my module build.gradle file:
sourceSets {
main{
java{
exclude '**/META-INF/MANIFEST'
exclude '**/META-INF/MANIFEST.MF'
exclude 'META-INF/MANIFEST'
exclude 'META-INF/MANIFEST.MF'
exclude '!META-INF/MANIFEST.MF'
}
}
}
Adding this:
sourceSets.main.res.filter.exclude 'META-INF/MANIFEST'
sourceSets.main.res.filter.exclude 'META-INF/MANIFEST.MF'
Also this:
packagingOptions {
apply plugin: 'project-report'
exclude '**/META-INF/MANIFEST'
exclude '**/META-INF/MANIFEST.MF'
exclude 'META-INF/MANIFEST'
exclude 'META-INF/MANIFEST.MF'
exclude '!META-INF/MANIFEST.MF'
}
And this:
packagingOptions {
pickFirst '**/META-INF/MANIFEST'
pickFirst '**/META-INF/MANIFEST.MF'
pickFirst 'META-INF/MANIFEST'
pickFirst 'META-INF/MANIFEST.MF'
pickFirst '!META-INF/MANIFEST.MF'
}
This:
aaptOptions {
ignoreAssetsPattern "!META-INF/MANIFEST.MF"
ignoreAssetsPattern "META-INF/MANIFEST.MF"
}
I think I've tried mostly everything in this question:
How to exclude certain files from Android Studio gradle builds?
Nothing worked.
After searching for a solution, I think the problem is that I have duplicated dependencies. So I've tried the following:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation ('com.android.support:appcompat-v7:22.2.1'){
exclude module: 'support-v4'
}
implementation ('com.android.support:design:22.2.1')
implementation 'com.github.frankiesardo:linearlistview:1.0.1#aar'
}
And this:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation ('com.android.support:design:22.2.1'){
exclude module: 'support-v7'
}
implementation 'com.github.frankiesardo:linearlistview:1.0.1#aar'
}
I still get the same error.
What am I doing wrong?
As Rajen Raiyarela said, go to File->Project Structure->Project->Android Gradle Plugin Version and downgrade it from 3.5.2 to 3.5.1.
Set project dependencies to:
classpath 'com.android.tools.build:gradle:3.5.3'
or latest one.
Note: by doing this, my problem has been resolved.
This issue is happening because of duplicate dependencies.
Check for multiple dependencies in the Gradle app.
Either package it once or not at all:
android {
packagingOptions {
pickFirst "META-INF/MANIFEST.MF"
// exclude "META-INF/MANIFEST.MF"
}
}
as #rubo77 says and after my confirmation:
Latest solution
Upgrade gradle version
eg:
from 3.5.2 to 3.5.3
from 3.5.2 to 3.5.4
Obsolete solution:
downgrade from 3.5.2 to 3.5.1
my choice is : upgrade from 3.5.2 to 3.5.4
build.gradle:
dependencies {
// classpath 'com.android.tools.build:gradle:3.5.2'
// classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.android.tools.build:gradle:3.5.4'
}

Android - android-apt plugin is incompatible with the Android Gradle plugin.

I'm in the process of getting this project up to par since the Gradle update. This is a team project and it was using the android-apt plugin. I've gone through and made the necessary syntax changes (compile --> implementation & apt --> annotation processor) but the compiler is still telling me there is a discrepancy:
android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
Anyone have any ideas?
Thank you for any insights
-T
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
}
}
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
def AAVersion = '4.0.0'
def JacksonVersion = '2.6.0'
def GPSVersion = '6.5.87'
dependencies {
implementation 'com.android.support:appcompat-v7:23.0.0'
implementation 'com.android.support:design:23.0.0'
implementation 'com.android.support:recyclerview-v7:23.0.0'
implementation 'com.android.support:preference-v7:23.0.0'
implementation "com.google.android.gms:play-services-maps:$GPSVersion"
implementation "com.google.android.gms:play-services-location:$GPSVersion"
implementation 'com.facebook.android:facebook-android-sdk:4.5.0'
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
annotationProcessor "org.androidannotations:rest-spring:$AAVersion"
implementation "org.androidannotations:androidannotations-api:$AAVersion"
implementation "org.androidannotations:rest-spring-api:$AAVersion"
implementation 'org.springframework.android:spring-android-rest-template:2.0.0.M3'
}
repositories {
maven {
url 'https://repo.spring.io/libs-milestone'
}
}
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
resourcePackageName "app"
logLevel 'TRACE'
logAppenderConsole 'true'
}
}
android {
compileSdkVersion 23
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "app"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
shrinkResources false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
google()
}
}
Try removing -
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
and
apply plugin: 'android-apt'
Annotation Processing became available in Android Gradle plugin (2.2 and later) so there is now no need / reason to provide an extra one.

Android Studio build failed with Kotlin

:app:mergeDebugAssets
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK kotlin/internal/internal.kotlin_builtins
File1: /Users/KD/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.0.4/172b43fbc03b521fed141484b212d6725fa671a9/kotlin-compiler-embeddable-1.0.4.jar
File2: /Users/KD/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-runtime/1.0.4/8e25da5e31669f5acf514bdd99b94ff5c7003b3b/kotlin-runtime-1.0.4.jar
My build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.app2par.ctime"
minSdkVersion 16
// minSdkVersion 21
// targetSdkVersion 23
targetSdkVersion 22
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled false
// multiDexEnabled true
}
dexOptions {
preDexLibraries true
javaMaxHeapSize "2g" // Use gig increments depending on needs
incremental true
}
buildTypes {
debug {
minifyEnabled false
// testCoverageEnabled true
// ext.betaDistributionReleaseNotes = getCrashlyticsBetaMessage()
// ext.betaDistributionGroupAliases = 'team'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
// dataBinding {
// enabled = true
// https://code.google.com/p/android/issues/detail?id=187443&q=attachments%3D0&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
// }
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':firebasesync')
compile project(':liboid')
compile project(':cloudtimemodel')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.1') {
exclude group: 'com.android.support'
}
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.1') {
exclude group: 'com.android.support'
}
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
// transitive = true;
// }
// compile 'com.google.android.gms:play-services:5.0.89'
// compile 'com.google.android.gms:play-services:7.0.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
// compile 'com.firebase:firebase-client-android:2.0.3.+'
// compile 'com.google.android.gms:play-services-safetynet:8.3.0'
// compile 'com.google.android.gms:play-services-auth:8.3.0'
compile 'com.google.android.gms:play-services-plus:7.0.0' // play-services-plus:7.0.0 : office-mover
// compile 'com.google.android.gms:play-services-auth:8.3.0' // play-services-auth:8.3.0 : ShoppingList++
// compile 'com.google.android.gms:play-services-identity:7.0.0'
}
buildscript {
// ext.kotlin_version = '1.0.0-rc-1036'
ext.kotlin_version = '1.0.4'
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// classpath 'org.ajoberstar:grgit:1.1.0'
// classpath 'io.fabric.tools:gradle:1.+'
// classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.5.0-x'
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
How to fix or diagnose this?
You should remove compile "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" from your dependencies section and move it to buildscript { dependencies { ... } }.
You did put compile "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" in the wrong build.gradle file
You may use kotlin plugin's build-in converters to deal with this. According to Kotlin Docs:
Configuring Kotlin in the project
When adding a new Kotlin file, IntelliJ IDEA (and Android Studio)
automatically prompts us as to whether we'd like to configure the
Kotlin runtime for the project. However, currently, converting
existing Java file does not prompt this action. Therefore we have to
invoke it manually (via Find Action):
We are then prompted for the version of Kotlin. Choose the latest
available from the list of installed versions.
After we configure Kotlin, build.gradle file for the application
should be updated. Now we can see that apply plugin: 'kotlin-android'
and the dependencies were added.
(For more details how to set up gradle for your project, please check
Using Gradle)
The last thing to do is to sync the project. We can press Sync Now
in a prompt or invoke an action Sync Project with Gradle Files.
From: https://kotlinlang.org/docs/tutorials/kotlin-android.html
Check link above for more information.
Hope it will help.
you need to apply only one plugin, in your case apply plugin: 'kotlin-android-extensions' and only compile "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" this dependency. it worked for me

Android Studio won't compile org/codehaus/groovy/runtime/StringGroovyMethods

Android Studio gradle is getting a groovy error as follows:
Error:(36, 0) Cause: org/codehaus/groovy/runtime/StringGroovyMethods
Open File
Haven't been able to resolve this for the most current version of Android Studio Canary version. I have added
classpath 'org.codehaus.groovy:groovy-backports-compat23:2.3.5'
to the Project: build.gradle and I still have an issue, seems like something has a compatibility issues, but not sure what.
Here's some of my version info:
AI-141.2071668 (latest canary build)
Plugins
Android Support Version: 10.1.3 RC 1
Groovy Version: 9.0
Java:
jdk1.7.0_79 and jdk1.7.0_17 (tried both)
Here are my gradle files:
Project: 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 'org.codehaus.groovy:groovy-backports-compat23:2.3.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
My gradle-wrapper.properties file:
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-2.2.1-all.zip
My application build.gradle file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
defaultConfig {
applicationId 'com.me.app'
minSdkVersion 16
targetSdkVersion 21
versionCode 1101
versionName "1.1.01"
multiDexEnabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/ASL2.0'
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'
}
productFlavors {
developercode {
minSdkVersion 16
applicationId 'com.me.app'
targetSdkVersion 21
versionCode 1101
versionName '1.1.01'
}
eridesharecode {
minSdkVersion 16
applicationId 'com.me.app'
targetSdkVersion 21
versionCode 1101
versionName '1.1.01'
}
}
dexOptions { javaMaxHeapSize "2g" }
compileOptions {
encoding "UTF-8"
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':library')
compile 'com.android.support:support-v4:21.0.0'
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'com.android.support:cardview-v7:21.0.0'
compile 'com.squareup.okio:okio:1.1.0'
compile 'com.squareup.okhttp:okhttp:2.2.0'
compile 'de.keyboardsurfer.android.widget:crouton:1.+#aar'
compile 'com.joanzapata.android:android-iconify:1.0.6'
compile 'com.tundem.aboutlibraries:library:4.0.1#aar'
compile 'com.squareup.retrofit:retrofit:1.7.1'
provided 'com.squareup.dagger:dagger:1.2.+'
compile 'com.google.android.gms:play-services:+'
compile 'cn.pedant.sweetalert:library:1.3'
compile 'de.greenrobot:eventbus:2.1.0'
compile files('libs/nineoldandroids-2.4.0.jar')
provided 'com.squareup.dagger:dagger-compiler:1.2.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.joanzapata.mapper:simple-mapper:1.0.10'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
compile 'com.google.maps.android:android-maps-utils:0.3+'
compile 'javax.mail:mail:1.4.7'
}
I have also cleaned out my .gradle folder, *.iml, build folders ... again to no resolution.
I have been able to downgrade Android Studio to version 141.1903250 and it works, but I like to take advantage of the newest Android Studio versions, when they don't break anything.
I did two things to resolve the issue. Add the groovy compile to the build.gradle files and used a older version of gradle.
I change the Project build.gradle file to the folloiwng:
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
I changed the module build.gradle file as follows:
buildscript {
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
// classpath 'com.android.tools.build:gradle:0.10.+'
// classpath 'com.uphyca.gradle:gradle-android-aspectj-plugin:0.9.8'
// classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}
}

Categories

Resources