jeromeee
jeromeee

Reputation: 11

Android-Pdf View Library

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 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' ]
    }
}
}

Upvotes: 1

Views: 1708

Answers (1)

Thiago
Thiago

Reputation: 13302

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'
    }

Upvotes: 1

Related Questions