Hi All,

  Finally i found the answer. Actually Java ProGuard is removing the 
unused/unreferenced code before making the apk.
  Since the methods are called using java reflection, ProGuard could not 
find reference/caller for the methods, so it removed from the class.   So  
by changing the ProGuard configuration i solved the problem.

Senthil.


On Tuesday, December 4, 2012 11:42:00 AM UTC+5:30, senthilnathan 
subramanian wrote:
>
> Hi all,
>
> I have developed one java library apk (lib.apk) and another test code apk 
> (test.apk) to test the library apk without Android Activity. The test code 
> apk uses android/java reflection methodology to fetch and invoke the 
> library API's at run time. It works when I start the test.apk with below 
> command,
>
> "am instrument  -e  class com.test  
> com.test/android.test.InstrumentationTestRunner" 
>
> I have issue with reflection when the test.apk defines an activity for 
> starting it from the Android launcher. 
>
> The test.apk does not find the methods defined in lib.apk, it throws 
> error  "java.lang.NoSuchMethodException:"
>
> Please help me to resolve this issue. 
> Regards,
>
> Senthil.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Security Discussions" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/android-security-discuss/-/VYqlVyTZjq4J.
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-security-discuss?hl=en.

Reply via email to