I'm getting an intermittent error when debugging, or installing my signed
app via adb
"E/dex2oat: Failed to create oat file:
/data/dalvik-cache/arm/system@[email protected]@classes.dex:
Permission denied"
As you can see it's a cyanogenmod app. Uninstalling the app, and then
trying again - it sometimes works again, like a 50:50 chance. From what I
can make out in the log, the above line is the culprit. On installs where
it DOES work this line is not present.
Fail log:
04-29 10:27:13.084 21225-21225/? D/AndroidRuntime: >>>>>> START com.android.
internal.os.RuntimeInit uid 2000 <<<<<<
04-29 10:27:13.089 21225-21225/? D/AndroidRuntime: CheckJNI is OFF
04-29 10:27:13.128 21225-21225/? D/ICU: No timezone override file found:
/data/misc/zoneinfo/current/icu/icu_tzdata.dat
04-29 10:27:13.159 21229-21229/? D/AndroidRuntime: >>>>>> START com.android.
internal.os.RuntimeInit uid 2000 <<<<<<
04-29 10:27:13.163 21229-21229/? D/AndroidRuntime: CheckJNI is OFF
04-29 10:27:13.164 21225-21225/? I/Radio-JNI:
register_android_hardware_Radio DONE
04-29 10:27:13.183 21225-21225/? D/AndroidRuntime: Calling main entry com.
android.commands.wm.Wm
04-29 10:27:13.185 21225-21225/? D/AndroidRuntime: Shutting down VM
04-29 10:27:13.201 21229-21229/? D/ICU: No timezone override file found:
/data/misc/zoneinfo/current/icu/icu_tzdata.dat
04-29 10:27:13.243 21229-21229/? I/Radio-JNI:
register_android_hardware_Radio DONE
04-29 10:27:13.266 21229-21229/? D/AndroidRuntime: Calling main entry com.
android.commands.am.Am
04-29 10:27:13.269 842-1454/? I/ActivityManager: START u0 {act=android.
intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp
=com.this.is.myapp/.MainActivity} from uid 2000 on display 0
04-29 10:27:13.279 21229-21229/? D/AndroidRuntime: Shutting down VM
04-29 10:27:13.292 842-3278/? I/ActivityManager: Start proc 21251:com.this.
is.myapp/u0a160 for activity com.this.is.myapp/.MainActivity
04-29 10:27:13.382 21263-21263/? E/dex2oat: Failed to create oat file:
/data/dalvik-cache/arm/system@[email protected]@classes
.dex: Permission denied
04-29 10:27:13.383 21263-21263/? I/dex2oat: dex2oat took 523.854us (threads:
4)
04-29 10:27:13.384 21251-21251/? W/art: Failed execv(/system/bin/dex2oat --
runtime-arg -classpath --runtime-arg --instruction-set=arm --instruction-
set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=
/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --
instruction-set-variant=krait --instruction-set-features=default --dex-file=
/system/framework/org.cyanogenmod.platform.jar --oat-file=/data/dalvik-cache
/arm/system@[email protected]@classes.dex) because non-
0 exit status
04-29 10:27:13.405 21251-21251/? W/System: ClassLoader referenced unknown
path: /data/app/com.this.is.myapp-1/lib/arm
04-29 10:27:13.406 21251-21251/? I/LoadedApk: No resource references to
update in package common
04-29 10:27:13.406 21251-21251/? I/LoadedApk: No resource references to
update in package com.blazze11.euphoria.dark
04-29 10:27:13.451 21251-21251/? D/myapp: HELLO!
In the above example, the app then runs until it receives random garbage
from the cyanogenmod functions called (System Profiles related) and then
crashes on a null pointer exception.
Successful log:
04-29 10:29:02.864 21661-21661/com.this.is.myapp W/art: Failed execv(
/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --instruction-
set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -
Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --
runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-
features=default --dex-file=/system/framework/org.cyanogenmod.platform.jar
--oat-file=/data/dalvik-cache/arm/system@[email protected].
[email protected]) because non-0 exit status
04-29 10:29:02.885 21661-21661/com.this.is.myapp W/System: ClassLoader
referenced unknown path: /data/app/com.this.is.myapp-1/lib/arm
04-29 10:29:07.961 21661-21661/com.this.is.myapp W/System: ClassLoader
referenced unknown path: /data/app/com.this.is.myapp-1/lib/arm
04-29 10:29:07.965 21661-21661/com.this.is.myapp I/LoadedApk: No resource
references to update in package common
04-29 10:29:07.967 21661-21661/com.this.is.myapp I/LoadedApk: No resource
references to update in package com.blazze11.euphoria.dark
04-29 10:29:08.206 21661-21661/com.this.is.myapp D/myapp: HELLO!
In this instance, all calls to the cyanogenmod functions are successful,
and everything works fine.
Just to highlight, no code changes in between - simply uninstalling app and
installing or debugging again.
(compileSdkVersion is 23, buildToolsVersion is 23.0.3)
Any ideas? I'm at my wit's end.
I hope I made sense, but let me know if I can provide more info...
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/97d4248a-cf2c-44b2-b4dc-2cf7dc8cae07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.