Android DexClassLoader error, 'optimized data directory .. not owned by current user'
问题 I am trying to produce a simple android application that can load a DEX file from the SD card at run-time. The application has two activites. The first activity is a simple screen that has a button. When the button is pressed, the second activity is launched which causes the loadDex() method to be invoked. The loadDex() method attempts to locate a jar file on the SD card and load it into the current application. Here is my code for the first activity: package poc.example.del.customclass;