Search code examples
javaandroidgoogle-project-tango

Cannot find package com.google.tango.support


I am trying to compile the Tango example files for an Asus ZenFone AR, however all apps using the support libraries cannot find com.google.tango.support.* (e.g. java_basic_examples/hello_video ). I've downloaded all .aar and .jar files from the SDK site, the classes are all there but in a different package, com.projecttango.tangosupport . When I change the import statement to the other package, the app compiles but crashes when starting on the device since it does not find the tangosupport package. There is a mismatch between local .jar/.aar and the device.

   10-18 09:00:21.975  9126  9154 E AndroidRuntime: FATAL EXCEPTION: Thread-3
   10-18 09:00:21.975  9126  9154 E AndroidRuntime: Process: com.projecttango.examples.java.hellovideo, PID: 9126
   10-18 09:00:21.975  9126  9154 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/projecttango/tangosupport/TangoSupport;
   10-18 09:00:21.975  9126  9154 E AndroidRuntime:  at com.projecttango.examples.java.hellovideo.HelloVideoActivity$2.run(HelloVideoActivity.java:134)
   10-18 09:00:21.975  9126  9154 E AndroidRuntime:  at java.lang.Thread.run(Thread.java:761)
   10-18 09:00:21.975  9126  9154 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.projecttango.tangosupport.TangoSupport" on path: DexPathList[[zip file "/system/framework/libtango_device2.jar", zip file "/data/app/com.projecttango.examples.java.hellovideo-1/base.apk"],nativeLibraryDirectories=[/data/app/com.projecttango.examples.java.hellovideo-1/lib/arm64, /system/lib64, /vendor/lib64]]
   10-18 09:00:21.975  9126  9154 E AndroidRuntime:  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
   10-18 09:00:21.975  9126  9154 E AndroidRuntime:  at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
   10-18 09:00:21.975  9126  9154 E AndroidRuntime:  at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
   10-18 09:00:21.975  9126  9154 E AndroidRuntime:  ... 2 more

The Tango core app has been installed on the device and is the newest version. I've also updated to the newest Android release via OTA update. Still the same error. I'm stumped...


Solution

  • It was impossible to find the correct libraries and replicate the new (i.e. gradle) toolchain. The easiest way was to install a kernel that supports 32bit and 64bit - this is enough to make the toolchain run on a 32bit system. This needs Debian Multiarch, adding amd64 to the supported architectures and installing linux-image:amd64 or similar, then rebooting.