soumith / torch-android

Torch-7 for Android
BSD 3-Clause "New" or "Revised" License
275 stars 83 forks source link

Demo app can be built/installed/opened on device, but cannot locate *.so files #88

Closed paramsen closed 7 years ago

paramsen commented 7 years ago

Build/install/open works good, but the app is not functioning correctly as you can see from the attached picture. The files exist in the correct directory on the device as you can see further down below.

pic

Running adb shell ls /data/app/com.torch.torchdemo-1/lib/arm64/ returns:

libTH.so libTHC.so libTHCUNN.so libTHNN.so libcutorch.so libgnustl_shared.so libimage.so libluaT.so libluajit.so libnnx.so libpaths.so libpng.so libpng16.so libppm.so libsundown.so libsys.so libthreads.so libthreadsmain.so libtorch.so libtorchandroid.so

Build output from ./demos/android-demo/build.sh

Updated local.properties Updated file ./proguard-project.txt It seems that there are sub-projects. If you want to update them please use the --subprojects parameter. GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu cp: cannot stat ‘../../install/libs/armeabi-v7a/*.so’: No such file or directory Buildfile: /home/vagrant/torch-android/demos/android-demo/build.xml

-set-mode-check:

-set-debug-files:

-check-env: [checkenv] Android SDK Tools Revision 24.4.1 [checkenv] Installed at /home/vagrant/NVPACK/android-sdk-linux

-setup: [echo] Project Name: TorchDemo [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup: [getbuildtools] Using latest Build Tools: 24.0.0 [echo] Resolving Build Target for TorchDemo... [gettarget] Project Target: Android 6.0 [gettarget] API level: 23 [echo] ---------- [echo] Creating output directories if needed... [mkdir] Created dir: /home/vagrant/torch-android/demos/android-demo/bin/rsObj [mkdir] Created dir: /home/vagrant/torch-android/demos/android-demo/bin/rsLibs [echo] ---------- [echo] Resolving Dependencies for TorchDemo... [dependency] Library dependencies: [dependency] No Libraries [dependency] [dependency] ------------------ [echo] ---------- [echo] Building Libraries with 'debug'... [subant] No sub-builds to iterate on

-code-gen: [mergemanifest] No changes in the AndroidManifest files. [echo] Handling aidl files... [aidl] No AIDL files to compile. [echo] ---------- [echo] Handling RenderScript files... [echo] ---------- [echo] Handling Resources... [aapt] Found new input file [aapt] Generating resource IDs... [echo] ---------- [echo] Handling BuildConfig class... [buildconfig] Generating BuildConfig class.

-pre-compile:

-compile: [javac] Compiling 2 source files to /home/vagrant/torch-android/demos/android-demo/bin/classes [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options. [javac] 3 warnings

-post-compile:

-obfuscate:

-dex: [dex] input: /home/vagrant/torch-android/demos/android-demo/bin/classes [dex] Found modified input file [dex] Converting compiled files and external libraries into /home/vagrant/torch-android/demos/android-demo/bin/classes.dex...

-crunch: [crunch] Crunching PNG Files in source dir: /home/vagrant/torch-android/demos/android-demo/res [crunch] To destination dir: /home/vagrant/torch-android/demos/android-demo/bin/res [crunch] Crunched 0 PNG files to update cache

-package-resources: [aapt] Creating full resource package...

-package: [apkbuilder] Current build type is different than previous build: forced apkbuilder run. [apkbuilder] Creating TorchDemo-debug-unaligned.apk and signing it with a debug key...

-post-package:

-do-debug: [zipalign] Running zip align on final apk... [echo] Debug Package: /home/vagrant/torch-android/demos/android-demo/bin/TorchDemo-debug.apk [propertyfile] Creating new property file: /home/vagrant/torch-android/demos/android-demo/bin/build.prop [propertyfile] Updating property file: /home/vagrant/torch-android/demos/android-demo/bin/build.prop [propertyfile] Updating property file: /home/vagrant/torch-android/demos/android-demo/bin/build.prop [propertyfile] Updating property file: /home/vagrant/torch-android/demos/android-demo/bin/build.prop

-post-build:

debug:

BUILD SUCCESSFUL Total time: 18 seconds error: no devices/emulators found

borisfom commented 7 years ago

The issue is fixed now.