i'm quite new ar , i'm using android studio 2.1.2 , tried run examples provided artoolkit.
the error says: gradle dsl method not found: 'sources()'
i'm using gradle 2.13, below code
apply plugin: 'com.android.application' android { compilesdkversion 23 buildtoolsversion "23.0.3" defaultconfig.with { applicationid "org.artoolkit.ar.samples.arsimple" minsdkversion 15 targetsdkversion 22 versioncode 1 //integer type incremented 1 every release, major or minor, google store versionname "1.0" //real qualified major , minor release description //buildconfigfields.with { //defines fields in generated java buildconfig class, in case, // create() { //default config, can accessed java code // type "int" //e.g. "if (1 == buildconfig.value) { /*do something*/}". // name "value" //see: [app or lib]/build/generated/source/buildconfig/[package path]/ // value "1" // buildconfig.java // } // } } } android.buildtypes { release { minifyenabled false proguardfiles file('proguard-rules.pro') } } android.productflavors { } android.sources { main.jni { source { srcdirs "src/main/nop" } } main.jnilibs { source { srcdirs "src/main/libs" } } } dependencies { //compile 'com.android.support:support-v4:23.0.1' //compile 'com.android.support:appcompat-v7:23.0.1' //only required when target device api level greater compile project(':arbaselib') } //the compile , target of app being deployed device android { buildtoolsversion '23.0.3' }
have followed these instructions on how set-up environment artoolkit , native development?
http://artoolkit.org/documentation/doku.php?id=4_android:android_native
please follow these instructions guide setup system if not aim develop native.
other cannot description contains less information.
the artoolkit examples ship preconfigured gradle.wrapper contains correct version , examples build out of box.
gradle.wrapper
distributionbase=gradle_user_home distributionpath=wrapper/dists zipstorebase=gradle_user_home zipstorepath=wrapper/dists distributionurl=https\://services.gradle.org/distributions/gradle-2.5-all.zip
build.gradle (from arsimpleproj)
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle-experimental:0.2.1' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } }
Comments
Post a Comment