So, I´ve been messing around this issue for a day, until I found what it seems to be the problem, but now I can´t figure out how to solve it..
I have a proyect that uses Kaltura player sdk for android (https://github.com/kaltura/player-sdk-native-android). I did some tests and it worked like a charm.. but then I tried to use it in my project and Gradle always fails when making the playerSDK with this error:
Error:Execution failed for task ':playerSDK:transformNative_libsWithSyncJniLibsForDebug'.
java.io.FileNotFoundException: ../video-android/player-sdk-native-android/playerSDK/build/intermediates/bundles/debug/jni/lib/armeabi/libHLSPlayerSDK.so (No such file or directory)
After a day trying to figure out why this happens just in this particular proyect.. I found the problem occurs just when I add Google Analytics (https://developers.google.com/analytics/devguides/collection/android/v4/). Adding classpath 'com.google.gms:google-services:1.5.0-beta2'
to the build.gradle (project) will make kaltura to throw this error on make proccess.
I´m not a gradle expert, in fact, I´m pretty new with it.. but I would like to know if there is some way to exclude this project dependency when building the playerSDK module.
This is the structure I have now:
|
\-- build.gradle(Project:SampleApp)
\-- build.gradle(Module:App)
\..
\..
\-- build.gradle(Module:playerSDK)
the project build has this:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:1.5.0-beta2' //<<This classpath is the problem
}
}
So, I need that classpath there to make google analytics work.. but for some strange reason, it brokes the playerSDK module.. Does anybody knows if there is a way to exclude that classpath for playerSDK module?
Thanks in advance!