Android -Kaltura SDK integration - android

I have downloaded Kaltura SDK and integrated into my project, I got below error, but when I ran demo application, I could run it.
Error:Execution failed for task ':playerSDK:transformNative_libsWithSyncJniLibsForRelease'.
> java.io.FileNotFoundException: /Users/aaaa/AndroidWorkplace/MediaShare/playerSDK/build/intermediates/bundles/release/jni/lib/armeabi/libHLSPlayerSDK.so (No such file or directory)
This is my gradle file:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.aaaa.testSample"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "0.1"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
useLibrary 'org.apache.http.legacy'
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':playerSDK')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:design:23.0.0'
compile ('org.apache.httpcomponents:httpmime:4.5'){
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#11sd') {
transitive = true;
}
compile files('libs/gson-2.2.4.jar')
}
Any support on this?

Related

I updated my android studio and gradle to the latest one -> and I can't work with data binding

I get this error message in app Gradle:
Failed to resolve: com.android.databinding:library:3.3.2
I see in another question it because of apt that in the Gradle
I don't have apt in my Gradle
Here is my app Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.ophiropt.meissa"
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-std=c++1z -frtti -fexceptions" } }
ndk {
abiFilters 'armeabi-v7a' }
vectorDrawables.useSupportLibrary = true}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}}
dataBinding {
enabled = true }
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'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.couchbase.lite:couchbase-lite-android:1.2.0'
compile 'com.google.code.gson:gson:2.6.2'
compile "com.android.support:recyclerview-v7:25.0.0"
compile 'com.android.support:cardview-v7:25.0.0'
compile 'com.android.support:design:25.0.1'
compile 'org.greenrobot:eventbus:3.0.0'
testCompile 'junit:junit:4.12'
compile 'com.afollestad.material-dialogs:core:0.9.4.5'
compile 'com.elmargomez.typer:typerlib:1.0.0'
compile (name:'charting-release', ext:'aar')
compile (name:'drawing-release', ext:'aar')
compile (name:'data-release', ext:'aar')
compile (name:'core-release', ext:'aar')
compile 'com.android.support.constraint:constraint-layout:1.0.2'
}
You need a google() dependency:
buildscript {
repositories {
google() // here
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
}
}
allprojects {
repositories {
google() // and here
jcenter()
}
the problem by me was that the minimum SDK version with Gradle gradle:3.3.2 has to be 28 and by me, it is 25

Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'. with release

When i generate release build then i got this error
Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/arch/core/internal/SafeIterableMap$ListIterator.class
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.23.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.hatchapps.multimedia"
minSdkVersion 16
targetSdkVersion 26
versionCode 17
multiDexEnabled = true
versionName "1.0"
// aaptOptions.cruncherEnabled = false
// aaptOptions.useNewCruncher = false
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// minifyEnabled false
multiDexEnabled = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
packagingOptions {
exclude '.readme'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/rxjava.properties'
exclude 'META-INF/services/javax.annotation.processing.Processor'
pickFirst 'AndroidManifest.xml'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'eu.inloop:localmessagemanager:0.1.5'
compile 'com.jakewharton:butterknife:8.8.1'
compile 'com.koushikdutta.ion:ion:2.2.1'
compile 'it.sephiroth.android.library.targettooltip:target-tooltip-library:1.3.15'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.cocosw:bottomsheet:1.3.0#aar'
compile 'com.zhy:flowlayout-lib:1.0.3'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.3.0'
compile 'com.andkulikov:transitionseverywhere:1.7.4'
compile 'com.master.android:permissionhelper:1.1'
compile 'net.alhazmy13.MediaPicker:libary:2.3.2'
compile 'com.github.jaychang0917:SimpleText:1.2.1'
compile 'com.github.tabassumLatif:ShimmerRecyclerView:0.1.2'
compile 'com.tomergoldst.android:tooltips:1.0.6'
compile 'com.github.Pixplicity:sharp:03c1568d26'
compile 'id.zelory:compressor:2.0.0'
compile 'com.github.danikula:AndroidVideoCache:v2.7.0'
compile ('com.google.firebase:firebase-messaging:11.0.2'){
force = true
}
compile 'com.fenchtose:tooltip:0.1.5'
compile 'com.jsibbold:zoomage:1.1.0'
compile 'at.blogc:expandabletextview:1.0.3'
compile 'com.github.douglasjunior:android-simple-tooltip:0.2.1'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.7'
compile 'com.oginotihiro:cropview:1.0.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.wonderkiln:camerakit:0.11.0'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile('com.android.support:support-v4:26.1.0'){
force = true
}
}
apply plugin: 'com.google.gms.google-services'
and
// 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:3.0.0'
// classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
// classpath 'com.google.firebase:firebase-plugins:1.0.5'
classpath 'com.google.gms:google-services:3.0.0'
// classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.3"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://plugins.gradle.org/m2/" }
/*maven {
url "https://maven.google.com"
}*/
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Reading the comments, and having this problem myself, the problem seems to stem from a bad thirdparty lib. Perhaps using incompatible gradle or buildtool library.
Problem libs:
com.wonderkiln:camerakit:0.11.0
android.arch.persistence.room
com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer
Others have similar problems with bad libs in their /libs folder.

java.util.zip.ZipException: duplicate entry: android/net/compatibility/WebAddress.class

Hy! I am having following problem in my Android project
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/net/compatibility/WebAddress.class
I Know this is because of conflict in dependencies. I looked into dependencies but not able to configure which dependencies causing this issue. I am pasting my gradle code bellow
Module 1 :
android {
//useLibrary 'org.apache.http.legacy'
compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
defaultConfig {
versionCode Integer.parseInt(project.VERSION_CODE)
versionName project.VERSION_NAME
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK)
targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
}`sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src/main/java']
res.srcDirs = ['res']
}
test {
java.srcDirs = ['src/test/java']
}
}`compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7` }
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'
exclude 'META-INF/services/javax.annotation.processing.Processor'
}`lintOptions {
abortOnError false
}
checkstyle {
ignoreFailures = true
}
buildToolsVersion '25.0.3'`}`dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':webViewMarker')
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:recyclerview-v7:25.0.1'
compile 'com.android.support:support-v4:25.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.daimajia.swipelayout:library:1.2.0#aar'
compile 'com.squareup:otto:1.3.8'`}`
Module 2
apply plugin: 'com.android.library'`ext {
bintrayRepo = 'maven'
bintrayName = 'folioreader'
publishedGroupId = 'com.folioreader'
libraryName = 'WebViewMarker'
artifact = 'webViewMarker'
libraryDescription = 'An epub reader for Android'
siteUrl = 'https://github.com/FolioReader/FolioReader-Android'
gitUrl = 'https://github.com/FolioReader/FolioReader-Android.git'
libraryVersion = '0.2.5'
developerId = 'mobisystech'
developerName = 'Folio Reader'
developerEmail = 'mahavir#codetoart.com'
licenseName = 'FreeBSD License'
licenseUrl = 'https://en.wikipedia.org/wiki/FreeBSD_Documentation_License#License'
allLicenses = ["FreeBSD"]`}`android {
compileSdkVersion 19
buildToolsVersion '25.0.3'
defaultConfig {
versionCode Integer.parseInt(project.VERSION_CODE)
versionName project.VERSION_NAME
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK)
targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}`
}
apply from: '../folioreader/bintray/installv1.gradle'
apply from: '../folioreader/bintray/bintrayv1.gradle'
Main Module
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}`}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 25
buildToolsVersion '25.0.3'
defaultConfig {
applicationId "com.ebook.stev_ebook"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':folioreader')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
compile 'com.facebook.android:facebook-android-sdk:4.8.0'
compile 'com.google.code.gson:gson:2.2.4'
compile 'org.apache.httpcomponents:httpmime:4.5.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.stripe:stripe-android:+'
compile('com.twitter.sdk.android:twitter:1.3.2#aar') {
transitive = true;
}
compile 'com.android.support:multidex:1.0.0'
compile 'com.squareup.okhttp3:okhttp:3.6.0'
compile 'com.google.android.gms:play-services-plus:9.0.0'
compile 'com.google.android.gms:play-services-auth:9.0.0'
}
Please comment this
compile 'com.daimajia.swipelayout:library:1.2.0#aar'
Try Rebuilding again. Since it's a third party library , there is a chance that it might be causing the trouble
It means you are using different version of support and all android libraries for example you are using support library version 25.0.1 in one module and version 22.2.1 in another and of course you should add just one of these library to your dependencies when you add one library in one module you should not add it to build.gradle file of second.
Solution : remove duplicate libraries.

maven paho-releases doesn't compile in gradle

I'm trying to use paho Mqtt's android client in android studio and using gradle to add dependencies, I use the following in app build.gradle:
repositories {
maven {
url "https://repo.eclipse.org/content/repositories/paho-releases/"
}
}
dependencies {
compile('org.eclipse.paho:org.eclipse.paho.android.service:1.0.2') {
exclude module: 'support-v4'
}
}
yet this is giving me failed to resolve error.I tried with SNAPSHOT version (1.0.3 and I got the same error. I've tried as many scripts as googling yielded to no result.
any help is greatly appreciated.
my refrence is :
http://www.hivemq.com/blog/mqtt-client-library-enyclopedia-paho-android-service
this is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.sayres.mqttapp"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven {
url "https://repo.eclipse.org/content/repositories/paho-releases/"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile('org.eclipse.paho:org.eclipse.paho.android.service:1.0.2') {
exclude module: 'support-v4'
}
}
Remove this from your app build.gradle and added to project build.gradle by allprojects
repositories {
maven { url "https://repo.eclipse.org/content/repositories/paho-releases/" }
}

Configuring Android Annotations v3.0.1 with Android Studio (Beta) 0.8.4

Configuring Android Annotations is quite irksome. But I finally figured out a solution and wish to share with everyone.
Use the below mentioned gradle buildscript.
Following are some of the references:
1) https://github.com/excilys/androidannotations/blob/develop/examples/gradle/build.gradle
2) https://bitbucket.org/hvisser/android-apt
3) http://www.jayway.com/2014/02/21/androidannotations-setup-in-android-studio/
build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
repositories {
mavenCentral()
}
ext.androidAnnotationsVersion = '3.0.1';
configurations {
apt
}
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
useOldManifestMerger true
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/notice.txt'
}
}
dependencies {
compile 'com.android.support:support-v4:20.0.+'
compile 'com.android.support:appcompat-v7:20.0.+'
apt "org.androidannotations:androidannotations:${androidAnnotationsVersion}"
compile "org.androidannotations:androidannotations-api:${androidAnnotationsVersion}"
compile fileTree(dir: 'libs', include: '*.jar')
}
apt {
arguments {
resourcePackageName 'com.yourpackage.name'
androidManifestFile variant.processResources.manifestFile
}
}

Categories

Resources