FolioReader-Android icon indicating copy to clipboard operation
FolioReader-Android copied to clipboard

Problem when importing using gradle dependency?

Open Maruf13 opened this issue 9 years ago • 14 comments

how solve this problem: My android studio version is 2.2.3 compileSdkVersion 26 buildToolsVersion "26.0.0" 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:26.0.0-alpha1' compile 'com.folioreader:folioreader:0.3.1' testCompile 'junit:junit:4.12' } problem Error:Failed to resolve: org.readium:r2-fetcher:0.1.2 Open File Show in Project Structure dialog

Maruf13 avatar Aug 23 '17 09:08 Maruf13

Yes.This Error happen me too. how can solve?

apply plugin: 'com.android.application'

android { compileSdkVersion 25 buildToolsVersion "26.0.0" defaultConfig { applicationId "com.heinzan.folioreader" 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' } } }

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' testCompile 'junit:junit:4.12'

compile 'com.folioreader:folioreader:0.3.1'

}

Error is Error:Failed to resolve: org.readium:r2-fetcher:0.1.2 Open File Show in Project Structure dialog

Error:Failed to resolve: org.readium:r2-parser:0.1.2 Open File Show in Project Structure dialog

Error:Failed to resolve: org.readium:r2-server:0.1.2 Open File Show in Project Structure dialog

heinzan avatar Aug 23 '17 11:08 heinzan

@Maruf13 @heinzan add this code to your project build.gradle file

allprojects {
    repositories {
        jcenter()
    }
    repositories {
        maven {
            url "http://dl.bintray.com/mobisystech/maven"
        }
    }
}

GautamChibde avatar Aug 23 '17 11:08 GautamChibde

@GautamChibde why required jar file can not execute? Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE File1: C:\Users\Maruf.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.8.6\2ef7b1cc34de149600f5e75bc2d5bf40de894e60\jackson-core-2.8.6.jar File2: C:\Users\Maruf.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.8.6\9577018f9ce3636a2e1cb0a0c7fe915e5098ded5\jackson-annotations-2.8.6.jar File3: C:\Users\Maruf.gradle\caches\modules-2\files-2.1\org.jsoup\jsoup\1.10.2\33ee82e324f4b1e40167f3dc5e01234a1c5cab61\jsoup-1.10.2.jar File4: C:\Users\Maruf.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.8.6\c43de61f74ecc61322ef8f402837ba65b0aa2bf4\jackson-databind-2.8.6.jar

Maruf13 avatar Aug 23 '17 13:08 Maruf13

@Maruf13 it seems the issue is a dependency conflict within the application. You can look at this post here.

If the issue still persists then you can provide your top level and module level build.gradle files here.

GautamChibde avatar Aug 23 '17 13:08 GautamChibde

Thanks @GautamChibde it works.

Maruf13 avatar Aug 23 '17 16:08 Maruf13

Thanks @GautamChibde it fine

heinzan avatar Aug 25 '17 03:08 heinzan

@GautamChibde when i added this repositories { maven { url "http://dl.bintray.com/mobisystech/maven" } } getting new error

Error:(29, 13) Failed to resolve: com.android.support:appcompat-v7:26.0.2 Install Repository and sync project
Show in File
Show in Project Structure dialog

zubyf09 avatar Sep 30 '17 10:09 zubyf09

For the duplicate file error, you can just use the following and your build.gradle app file:

android { packagingOptions { exclude 'META-INF/LICENSE' } }

sdilizio avatar Oct 06 '17 03:10 sdilizio

I get the following problem after add Maven repository:

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar] C:\Users\Polotto.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\1cb6f15890c9394258c40b6e23108931\res\values\values.xml Error:(246, 5) error: duplicate value for resource 'attr/font' with config ''. Error:(246, 5) error: resource previously defined here. C:\Source\epubpublisher\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml Error:(491) duplicate value for resource 'attr/font' with config ''. Error:(429) resource previously defined here. Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:Execution failed for task ':app:mergeDebugResources'.

Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Information:BUILD FAILED in 3s Information:6 errors Information:0 warnings Information:See complete output in console

Anyone knows what's happening?

polotto avatar Nov 23 '17 00:11 polotto

I have the same problem... please we need help... anyone?

ErickZherdmant avatar Nov 25 '17 20:11 ErickZherdmant

Anyone?

DaskiOFF avatar Dec 07 '17 05:12 DaskiOFF

same here

udoy-touhid avatar Dec 14 '17 18:12 udoy-touhid

@udoy-touhid @DaskiOFF @Zherdmant try new version 0.3.3

GautamChibde avatar Dec 15 '17 07:12 GautamChibde

It's still hapening. Error:Failed to resolve: org.readium:r2-fetcher:0.1.2 Error:Failed to resolve: org.readium:r2-parser:0.1.2 Error:Failed to resolve: org.readium:r2-server:0.1.2

hemantbavle1 avatar Jan 19 '18 13:01 hemantbavle1