Open clhols opened 7 years ago
What other imports are you using in your project? Is there a reason you're using implementation
over compile
? What happens if you use version 0.1?
I am using:
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation 'com.google.android.libraries.tv:companionlibrary:0.2'
implementation 'com.google.android.exoplayer:exoplayer:r2.5.1'
//implementation project(':exoplayer-lib')
//implementation project(':exoplayer-library')
implementation 'org.jetbrains.anko:anko-sdk15:0.10.1'
implementation 'com.github.bumptech.glide:glide:4.2.0'
implementation "com.github.bumptech.glide:okhttp3-integration:4.2.0"
implementation 'com.squareup.okhttp3:okhttp:3.9.0'
implementation "com.android.support:design:$supportLibVersion"
implementation "com.android.support:support-v4:$supportLibVersion"
implementation "com.android.support:recyclerview-v7:$supportLibVersion"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation "com.google.android.gms:play-services-gcm:$playServicesVersion"
implementation 'android.arch.lifecycle:extensions:1.0.0'
implementation 'android.arch.lifecycle:reactivestreams:1.0.0'
annotationProcessor 'android.arch.lifecycle:compiler:1.0.0'
implementation 'io.reactivex.rxjava2:rxjava:2.1.2'
implementation 'io.reactivex.rxjava2:rxkotlin:2.1.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
I stopped using compile when Gradle introduced implementation
and api
:
https://docs.gradle.org/current/userguide/java_library_plugin.html
The 0.1 version has the same issue.
I have now copied the library module and removed the AdController and dependency on com.google.ads.interactivemedia.v3:interactivemedia
. Now it works much better.
Looks like the lib is using a pretty old version of Google Play Services which may cause a conflict with the newer version. Perhaps there needs to be some dependency updates to the lib overall.
@Fleker is your issue solved just by Updating google Play Service?
This is how I currently have the project included in a build.gradle:
// TV Input Framework
implementation('com.google.android.libraries.tv:companionlibrary:0.2') {
exclude group: "com.google.ads.interactivemedia.v3"
exclude group: "com.google.android.gms"
exclude group: "com.android.support"
}
I do have more modernization on the way.
@Fleker My problem solved just by replacing jar files with their gradle versions.
In my app, I was adding the jar dependencies like this:
implementation files('libs/json-simple-1.1.1.jar') But I realised that they were already added because of the following first line in dependencies:
implementation fileTree(include: ['*.jar'], dir: 'libs') This line adds all the jars in lib folder to app dependency.
Hence after removing the extra dependency implementation files('libs/json-simple-1.1.1.jar')
it is working fine.
Anyone use this and got it working ? There seems to be a problem with this Repository.
Also @integer/google_play_services_version file is missing
For Update :
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'
exclude 'META-INF/rxjava.properties'
exclude 'error_prone/Annotations.gwt.xml'
exclude 'third_party/java_src/error_prone/project/annotations/Annotations.gwt.xml'
exclude 'third_party/java_src/error_prone/project/annotations/Google_internal.gwt.xml'
exclude 'third_party/java_src/error_prone/project/annotations/Google_internal.gwt.xml'
exclude 'jsr305_annotations/Jsr305_annotations.gwt.xml'
}
hi guys i am having the same issue compiling it on android studio build gradle 3.1.0
and having the same error but ralphgabrielle solution did not owrk form me
I have change playServicesVersion = '18.1.1' version from 12.0.0 to 18.1.1, it works.
So whats the final solution for this ?
Hi, Only put the code in my gradle:
packagingOptions { exclude 'error_prone/Annotations.gwt.xml' exclude 'third_party/java_src/error_prone/project/annotations/Annotations.gwt.xml' exclude 'third_party/java_src/error_prone/project/annotations/Google_internal.gwt.xml' exclude 'jsr305_annotations/Jsr305_annotations.gwt.xml' }
Adding @heitorri solution to build.gradle (Module: app) fixes the problem
I will open a pull request for this :D
This solve my problem implementation('com.google.android.libraries.tv:companionlibrary:0.4.1') { exclude group: "com.google.android.gms" }
When trying to build my project with the dependency:
I get the following error:
I looks like this file is inside the com.google.ads.interactivemedia.v3:interactivemedia library that the companionlibrary depends on.
I tried to exclude it:
But then it fails in onCreateSession with:
java.lang.Class<com.google.android.media.tv.companionlibrary.AdController>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/ads/interactivemedia/v3/api/AdErrorEvent$AdErrorListener;