How did you disable Dex preopt?

On Sunday, May 29, 2016 at 4:04:01 PM UTC-4, Vlady Ostrovski wrote:
>
> Disabling Dex preopt fixed the issue. But now the Settings app isn't dex 
> optimized.. this is a weird issue. 
>
> On Thursday, May 26, 2016 at 7:14:27 PM UTC+3, Vlady Ostrovski wrote:
>>
>> I've built Android 6.0.1 for Nexus 9 LTE (a clean build out of fresh 
>> source using dist build), signed it with my own release-keys and flashed it 
>> on the device.
>> Every thing seemed to work well, until i reboot the device. After that 
>> whenever i try to open the settings app it crashes with this:
>>
>> --------- beginning of crash
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime: FATAL EXCEPTION: main
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime: Process: 
>> com.android.settings, PID: 1785
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime: 
>> java.lang.RuntimeException: Unable to get provider 
>> android.support.v4.content.FileProvider: java.lang.ClassNotFoundException: 
>> Didn't find class "android.support.v4.content.FileProvider" on path: 
>> DexPathList[[zip file 
>> "/system/priv-app/Settings/Settings.apk"],nativeLibraryDirectories=[/system/priv-app/Settings/lib/arm64,
>>  
>> /system/priv-app/Settings/Settings.apk!/lib/armeabi-v7a, /vendor/lib, 
>> /system/lib]]
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> android.app.ActivityThread.installProvider(ActivityThread.java:5156)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> android.app.ActivityThread.-wrap1(ActivityThread.java)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> android.os.Handler.dispatchMessage(Handler.java:102)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> android.os.Looper.loop(Looper.java:148)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> android.app.ActivityThread.main(ActivityThread.java:5417)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> java.lang.reflect.Method.invoke(Native Method)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime: Caused by: 
>> java.lang.ClassNotFoundException: Didn't find class 
>> "android.support.v4.content.FileProvider" on path: DexPathList[[zip file 
>> "/system/priv-app/Settings/Settings.apk"],nativeLibraryDirectories=[/system/priv-app/Settings/lib/arm64,
>>  
>> /system/priv-app/Settings/Settings.apk!/lib/armeabi-v7a, /vendor/lib, 
>> /system/lib]]
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> java.lang.ClassLoader.loadClass(ClassLoader.java:511)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> java.lang.ClassLoader.loadClass(ClassLoader.java:469)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        at 
>> android.app.ActivityThread.installProvider(ActivityThread.java:5141)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        ... 10 more
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        Suppressed: 
>> java.io.IOException: No original dex files found for dex location 
>> /system/priv-app/Settings/Settings.apk
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> dalvik.system.DexFile.openDexFileNative(Native Method)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> dalvik.system.DexFile.openDexFile(DexFile.java:295)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> dalvik.system.DexFile.<init>(DexFile.java:80)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> dalvik.system.DexFile.<init>(DexFile.java:59)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> dalvik.system.DexPathList.loadDexFile(DexPathList.java:279)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> dalvik.system.DexPathList.makePathElements(DexPathList.java:248)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> dalvik.system.DexPathList.<init>(DexPathList.java:120)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> dalvik.system.PathClassLoader.<init>(PathClassLoader.java:65)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> android.app.LoadedApk.getClassLoader(LoadedApk.java:376)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> android.app.LoadedApk.makeApplication(LoadedApk.java:568)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                ... 8 more
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        Suppressed: 
>> java.lang.ClassNotFoundException: android.support.v4.content.FileProvider
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> java.lang.Class.classForName(Native Method)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> java.lang.BootClassLoader.findClass(ClassLoader.java:781)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                at 
>> java.lang.ClassLoader.loadClass(ClassLoader.java:504)
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:                ... 12 
>> more
>> 05-25 11:25:30.181  1785  1785 E AndroidRuntime:        Caused by: 
>> java.lang.NoClassDefFoundError: Class not found using the boot class 
>> loader; no stack trace available
>> 05-25 11:25:30.183   671   794 W ActivityManager:   Force finishing 
>> activity com.android.settings/.Settings
>>
>> Anyone has any idea on why?
>> I've noticed that it looks for native libs in /system/priv-app/Settings/
>> *lib*/arm64 whilst on the device they are at /system/priv-app/Settings/
>> *oat*/arm64. but i'm not sure it has to do with that.
>>
>> Any help would be appreciated.
>>
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to