I want to install an app on a Google Tango tablet, on which I'm root.
I tried as well to compile with make -j
and ant debug install
, I keep having the error [exec] Failure [INSTALL_FAILED_DEXOPT]
even if it ends with a BUILD SUCCESSFUL
. The app doesn't install on the tablet.
I ran a logcat and here are (to me) the relevant catches :
I/PackageManager( 929): onServiceConnected
D/DefContainer( 3008): internal storage: block size=4096, # of available blocks=28501958
D/DefContainer( 3008): internal storage: availInternalSize=116744019968, apk size=4629092
W/ActivityManager( 929): No content provider found for permission revoke: file:///data/local/tmp/superstuff-debug.apk
W/ActivityManager( 929): No content provider found for permission revoke: file:///data/local/tmp/superstuff-debug.apk
I/PackageManager( 929): Copying native libraries to /data/app-lib/vmdl-1009153656
I/PackageManager( 929): Checking for more work or unbind...
I/PackageManager( 929): Posting delayed MCS_UNBIND
I/PackageManager( 929): Running dexopt on: fr.my.superstuff
I/dex2oat ( 3216): dex2oat: /data/dalvik-cache/data@app@fr.my.superstuff-1.apk@classes.dex
E/dex2oat ( 3216): Unrecognized version number in /data/app/fr.my.superstuff-1.apk: 0 3 8
E/dex2oat ( 3216): Failed to open dex file '/data/app/fr.my.superstuff-1.apk' from memory
E/dex2oat ( 3216): Failed to open dex from file descriptor for zip file: /data/app/fr.my.superstuff-1.apk
W/installd( 168): DexInv: --- END '/data/app/fr.my.superstuff-1.apk' --- status=0x0100, process failed
E/installd( 168): dexopt in='/data/app/fr.my.superstuff-1.apk' out='/data/dalvik-cache/data@app@fr.my.superstuff-1.apk@classes.dex' res=256
W/PackageManager( 929): Package couldn't be installed in /data/app/fr.my.superstuff-1.apk
D/AndroidRuntime( 3204): Shutting down VM
E/WifiController( 929): Not handled here 155652
I tried after that to navigate with adb shell su
through the directories but I guess all the files written in the logcat are temporary because I couldn't find them.
Here is my Makefile :
MAIN_ACTIVITY=fr.my.superstuff/.$(shell grep "<activity android:name" AndroidManifest.xml | cut -d\" -f2)
SDK_PATH=/people/me/Documents/Android/sdk
NDK_PATH=/people/me/Documents/Android/android-ndk-r10e
APP_TAG=ARViewer
LOG_FILTER=$(APP_TAG):V NativeApp:V VES:V AndroidRuntime:E libEGL:W StrictMode:V libc:F DEBUG:I
all: compile-debug
compile-debug:
+$(NDK_PATH)/ndk-build -j NDK_DEBUG=1
cp thirdparty/TangoSDK_Gemma_Java.jar libs/
cp thirdparty/QCAR/libs/armeabi-v7a/libQCAR.so libs/armeabi-v7a/
cp thirdparty/QCAR/libs/QCAR-hacked.jar libs/
ant -Djava.compilerargs=-Xlint debug installd
# compile-release:
# LC_ALL= $(NDK_PATH)/ndk-build -j NDK_DEBUG=0
# ant release installr
# fast-compile-debug:
# @/bin/zsh -c 'echo > /tmp/.ant-input && echo > /tmp/.ant-output && \
# echo fast-compile-debug >> /tmp/.ant-input && \
# ( while IFS='' read -r line; do echo "$$line"; \
# [[ "$$line" =~ "^ant>" ]] && exit; done \
# < <(tailf /tmp/.ant-output)) | strings'
clean:
ant clean
rm -rf obj libs
test:
@urxvt -e sh -c "adb logcat -c; adb shell am start -n $(MAIN_ACTIVITY); adb logcat -s $(LOG_FILTER)"
debug-java:
adb shell am start -e debug true -n $(MAIN_ACTIVITY)
adb forward tcp:7777 jdwp:$$(adb jdwp | tail -1)
jdb -sourcepath src -attach localhost:7777
debug-native:
adb shell am start -e debug true -n $(MAIN_ACTIVITY)
$(NDK_PATH)/ndk-gdb
log:
adb logcat -s $(LOG_FILTER)
I have no idea how to solve this error. i saw other stack threads but it didn't help me. I'm not using Android studio nor any editor, I was given this code just to install it and after that work around.
EDIT : After some searches I found that it may have something to do with dex files, as said in the logcat. The tablet uses Android 4.4.2 and dex is 038, but I can't find if they are compatible between each other. But it should work, as it worked before on the same tablet but different computer. Same code.