How to add TIKA into build.gradle using android studio? -
i'm trying put apache tika project. returns error, unfortunately, couldn't solve problem myself.
how can put apache tika using android studio?
error:(27, 0) gradle dsl method not found: 'runtime()' possible causes:
the project 'audiotest' may using version of gradle not contain method. open gradle wrapper file the build file may missing gradle plugin. apply gradle plugin
apply plugin: 'com.android.application' android { compilesdkversion 23 buildtoolsversion "23.0.2" defaultconfig { applicationid "com.example.test.audiotest" minsdkversion 16 targetsdkversion 23 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) testcompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.0' compile 'com.google.android.gms:play-services-appindexing:8.1.0' runtime 'org.apache.tika:tika-parsers:1.13' }
this build.gradle module:app
// top-level build file can add configuration options common sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.1.2' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: delete) { delete rootproject.builddir }
this build.gradle project:audiotest
change
runtime 'org.apache.tika:tika-parsers:1.13'
to
compile 'org.apache.tika:tika-parsers:1.13'
Comments
Post a Comment