1

After importing this library: https://github.com/JoanZapata/android-pdfview ,

I got this error:

Error:The SDK Build Tools revision (19.0.3) is too low for project ':android-pdfview-sample'. Minimum required is 19.1.0

So i change the build.gradle minSdk from 19.0.3 to 19.1.0 then another error comes up:

Error:FAILURE: Build failed with an exception.

  • What went wrong: Task '' not found in root project 'Finallyariel'.

  • Try: Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

what will i change to fix this?TIA

this is the build.gradle file in the app:

apply plugin: 'android'
description = 'android-pdfview-sample'
android {
compileSdkVersion 19
buildToolsVersion "19.0.3"

defaultConfig {
    minSdkVersion 8
    targetSdkVersion 19
    versionCode 2
    versionName "1.0.1"
}

sourceSets {
    main {
        manifest.srcFile 'AndroidManifest.xml'
        resources.srcDirs = ['src']
        aidl.srcDirs = ['src']
        renderscript.srcDirs = ['src']
        res.srcDirs = ['res']
        assets.srcDirs = ['assets']
    }
}
}

dependencies {
compile project(':android-pdfview')
provided 'com.googlecode.androidannotations:androidannotations:2.7.1'
compile 'com.googlecode.androidannotations:androidannotations-api:2.7.1'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
}

build.gradle of the library:

apply plugin: 'android-library'
description = 'android-pdfview'
android {
compileSdkVersion 19
buildToolsVersion '19.0.3'

sourceSets {
    main {
        manifest.srcFile 'AndroidManifest.xml'
        jniLibs.srcDirs = [ 'libs' ]
    }
}
}
jeromeee
  • 11
  • 5
  • show your gradle file – Marcin Orlowski Aug 04 '15 at 18:52
  • or give me some other ways of importing this library to my new project. I only added the library using the project structure then I add the module dependency.Nothing happens when i put compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' in the build.gradle – jeromeee Aug 04 '15 at 23:57

1 Answers1

1

try this:

apply plugin: 'com.android.application'

android {
        compileSdkVersion 23
        buildToolsVersion "23.0.2"
    ...

    dependencies {
    compile 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar'
    }
Thiago
  • 12,778
  • 14
  • 93
  • 110