Unbelievable... 

I have figured out by chance. 

*DexClassLoader.loadClass* fails if param *dexPath* (of 
*...newDexClassLoader(String 
dexPath ...)* does not end with "*.jar*".

Since when does file-extension matter on *nix systems?! Unbelievable...


On Tuesday, July 9, 2013 4:41:40 PM UTC+2, Grigory F. wrote:
>
> Hi all, 
>
> I've already spend a lot hours and really come to no solution. Any 
> help or hints would be great. 
>
> What I'm doing: 
>
> 1. use a custom "build.xml" to add a package as asset to my app 
>
> 2. on the app start read from asset and write the jar-file to private 
> app-directory (/data/data/MY_PACKAGE/app_dex/JAR_FILE) 
>
> 3. then using DexClassLoader.loadClass and an interface of this class 
> I call a method 
>
> The whole thing works on Android 2.1 and has worked some months ago on 
> Jelly Bean too. If I run the app from eclipse it works as well. But if 
> I do "ant release" and install the ...release.apk to my device (4.2.2) 
> I get: 
>
> java.lang.ClassNotFoundException: Didn't find class "MY_CLASS" on 
> path: /data/data/MY_PACKAGE/app_dex/JAR_FILE 
>
> I've already checked, the JAR_FILE exists, it's readable. 
>
> I've also extracted the asset-file and done "dexdump" - the class is 
> there, the name is correct. And as I say, this works on Android 2.1 
>
> Really no idea... it's on ADT 17? 
>
>
>
> Kind regards, 
> Grigory 
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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-developers?hl=en
--- 
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].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to