Page 1 of 1

can't run android example

Posted: Wed Apr 11, 2018 5:52 am
by SteelBytes
me thinks this looks interesting ...

downloads artoolkitx-1.0-Android.zip
unzips
opens artoolkitX\Examples\Square tracking example with OSG\Android\ARSquareTracking in AS3.1
press compile and run
app crashes (logcat below)
checks build.gradle
sees references to ../../../../../Source/etc/android/cparam_cache
goes searching for cparam_cache in the unziped folder
finds nothing
throws hands in air
decides it's beer o'clock


04-11 15:49:53.151 12675-12675/? I/zygote64: Late-enabling -Xcheck:jni
04-11 15:49:53.207 12675-12685/? E/zygote64: Failed sending reply to debugger: Broken pipe
04-11 15:49:53.207 12675-12685/? I/zygote64: Debugger is no longer active
04-11 15:49:53.260 12675-12675/? I/AssetHelper: cacheAssetFolder(): Cache index not found for folder 'Data'. Re-caching.
04-11 15:49:53.262 12675-12675/? I/AssetHelper: getAssetFilenames(): Found asset 'Data/camera_para.dat'
getAssetFilenames(): Found asset 'Data/hiro.patt'
04-11 15:49:53.263 12675-12675/? I/AssetHelper: getAssetFilenames(): Found asset 'Data/kanji.patt'
04-11 15:49:53.263 12675-12675/? I/AssetFileTransfer: copyAssetToTargetDir(): [Data/kanji.patt] -> [/data/user/0/org.artoolkitx.arx.arsquaretracking/cache/Data/kanji.patt]
copyAssetToTargetDir(): Target file does not exist. Creating directory structure.
04-11 15:49:53.265 12675-12675/? I/AssetFileTransfer: copyAssetToTargetDir(): [Data/hiro.patt] -> [/data/user/0/org.artoolkitx.arx.arsquaretracking/cache/Data/hiro.patt]
copyAssetToTargetDir(): Target file does not exist. Creating directory structure.
04-11 15:49:53.266 12675-12675/? I/AssetFileTransfer: copyAssetToTargetDir(): [Data/camera_para.dat] -> [/data/user/0/org.artoolkitx.arx.arsquaretracking/cache/Data/camera_para.dat]
copyAssetToTargetDir(): Target file does not exist. Creating directory structure.
04-11 15:49:53.269 12675-12675/? I/AssetHelper: cacheAssetFolder(): Cache index not found for folder 'cparam_cache'. Re-caching.
04-11 15:49:53.270 12675-12675/? I/AssetHelper: getAssetFilenames(): Found asset 'cparam_cache'
04-11 15:49:53.271 12675-12675/? W/System.err: org.artoolkitx.arx.arxj.assets.AssetFileTransferException: Unable to open the asset file: cparam_cache
at org.artoolkitx.arx.arxj.assets.AssetFileTransfer.copyAssetToTargetDir(AssetFileTransfer.java:97)
at org.artoolkitx.arx.arxj.assets.AssetHelper.copyAssetFolder(AssetHelper.java:85)
at org.artoolkitx.arx.arxj.assets.AssetHelper.cacheAssetFolder(AssetHelper.java:160)
at org.artoolkitx.arx.arsquaretracking.ARSquareTrackingApplication.initializeInstance(ARSquareTrackingApplication.java:72)
04-11 15:49:53.272 12675-12675/? W/System.err: at org.artoolkitx.arx.arsquaretracking.ARSquareTrackingApplication.onCreate(ARSquareTrackingApplication.java:60)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
04-11 15:49:53.273 12675-12675/? W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.io.FileNotFoundException: cparam_cache
04-11 15:49:53.274 12675-12675/? W/System.err: at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:374)
at android.content.res.AssetManager.open(AssetManager.java:348)
at org.artoolkitx.arx.arxj.assets.AssetFileTransfer.copyAssetToTargetDir(AssetFileTransfer.java:93)
... 14 more
04-11 15:49:53.275 12675-12675/? W/System.err: java.io.FileNotFoundException: /data/user/0/org.artoolkitx.arx.arsquaretracking/cache/cparam_cache/cacheIndex-1.txt (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:287)
at java.io.FileOutputStream.<init>(FileOutputStream.java:223)
at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
at java.io.FileWriter.<init>(FileWriter.java:90)
04-11 15:49:53.276 12675-12675/? W/System.err: at org.artoolkitx.arx.arxj.assets.AssetHelper.cacheAssetFolder(AssetHelper.java:165)
at org.artoolkitx.arx.arsquaretracking.ARSquareTrackingApplication.initializeInstance(ARSquareTrackingApplication.java:72)
at org.artoolkitx.arx.arsquaretracking.ARSquareTrackingApplication.onCreate(ARSquareTrackingApplication.java:60)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
04-11 15:49:53.277 12675-12675/? W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
04-11 15:49:53.278 12675-12675/? W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
04-11 15:49:53.384 12675-12675/? I/AndroidUtils: reportDisplayInformation(): Display is 1440x2392, Density: unknown
04-11 15:49:53.463 12675-12675/? I/ARXJ::ARActivity: onStart(): called
04-11 15:49:53.463 12675-12675/? I/ARX_jni: Attempting to load library ARX.
04-11 15:49:53.495 12675-12675/? I/ARController: Loaded native library.
ARController(): ARController constructor
04-11 15:49:53.495 12675-12675/? I/libAR: [info] artoolkitX v1.0.0 initalised.
04-11 15:49:53.496 12675-12675/? I/ARController: artoolkitX v1.0.0
04-11 15:49:53.503 12675-12675/? I/ARXJ::ARActivity: onResume(): called
04-11 15:49:53.505 12675-12675/? I/CameraAccessHandlerImpl: CameraAccessHandlerImpl(): ctor called
04-11 15:49:53.506 12675-12675/? D/AndroidRuntime: Shutting down VM
04-11 15:49:53.509 12675-12675/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.artoolkitx.arx.arsquaretracking, PID: 12675
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/ContextCompat;
at org.artoolkitx.arx.arxj.camera.CameraAccessHandlerImpl.<init>(CameraAccessHandlerImpl.java:67)
at org.artoolkitx.arx.arxj.AndroidUtils$1.<init>(AndroidUtils.java:219)
at org.artoolkitx.arx.arxj.AndroidUtils.createCameraAccessHandler(AndroidUtils.java:219)
at org.artoolkitx.arx.arxj.ARActivity.onResume(ARActivity.java:190)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1355)
at android.app.Activity.performResume(Activity.java:7107)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.ContextCompat" on path: DexPathList[[zip file "/data/app/org.artoolkitx.arx.arsquaretracking-z88km7lngO2H5LjupR1dmQ==/base.apk"],nativeLibraryDirectories=[/data/app/org.artoolkitx.arx.arsquaretracking-z88km7lngO2H5LjupR1dmQ==/lib/arm64, /data/app/org.artoolkitx.arx.arsquaretracking-z88km7lngO2H5LjupR1dmQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at org.artoolkitx.arx.arxj.camera.CameraAccessHandlerImpl.<init>(CameraAccessHandlerImpl.java:67) 
at org.artoolkitx.arx.arxj.AndroidUtils$1.<init>(AndroidUtils.java:219) 
at org.artoolkitx.arx.arxj.AndroidUtils.createCameraAccessHandler(AndroidUtils.java:219) 
at org.artoolkitx.arx.arxj.ARActivity.onResume(ARActivity.java:190) 
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1355) 
at android.app.Activity.performResume(Activity.java:7107) 
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556) 
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862) 
at android.app.ActivityThread.-wrap11(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6494) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
04-11 15:49:55.231 12675-12685/? I/zygote64: Ignoring second debugger -- accepting and dropping