We had the same error today in the Rajawali project, that is, we did not implement our own components, but used a library that implements some of our own OpenGL components. I suppose this has something to do with updating Android Studio (it was 2.2.3 on this machine), but I cannot clearly say at this point. It just "suddenly stopped working."
However, we had to go to the experimental tools for building Android and apply the Mike fix above to make it work. Migration guidance (somewhat outdated) can be found here . For reference, we only needed to adjust build.gradle and app/build.gradle , which now look like this:
// build.gradle buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle-experimental:0.8.3' // used to be: 'com.android.tools.build:gradle:2.2.2' } } allprojects { repositories { mavenLocal() jcenter() } }
... and
//app/build.gradle apply plugin: 'com.android.model.application' // used to be 'com.android.application' // android() migrated according to guide // note that buildConfigFields() is missing, because it lead to errors model { android { compileSdkVersion 19 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.projecttango.experiments.augmentedrealitysample" minSdkVersion.apiLevel 19 targetSdkVersion.apiLevel 19 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles.add(file("proguard-rules.pro")) } } productFlavors { create("flavor1") { applicationId "com.app" } } sources { main { java { source { srcDir "src" } } } } // Fix suggested by Mike above ndk { platformVersion 21 } } } // Remaining Rajawali "noise" def external_lib_prefix = null if (project.hasProperty("Tango.catkin_devel_prefix")) { external_lib_prefix = project.property("Tango.catkin_devel_prefix") } else { // Building in standalone sample form. external_lib_prefix = "../../TangoReleaseLibs" } repositories { flatDir { dirs external_lib_prefix + '/aar' } } dependencies { compile fileTree(dir: external_lib_prefix + '/jar', include: ['**/*.jar']) compile (name: 'tango_support_java_lib', ext: 'aar') compile 'org.rajawali3d:rajawali: 1.1.668@aar ' }
Once you're done, make sure you sync your Gradle project in Android Studio. Otherwise, when you try to start right away, you will see something like Task 'generateDebugSources' not found in project ':app' .
Michael jess
source share