VFY: unable to find class referenced in signature

by hefeng » Tue, 07 Jul 2009 00:06:43 GMT


Sponsored Links
 Hello,

I try to port the XMPP library to android sdk 1.5, follow the demo
ApiDemo from the sdk,  I created a directory something like below:

      smack--+AndroidManifest.xml                          ..The
manifest for the smack library

                    |
 
+src                                                     ..The source
code for the smack
                    :
                    :
                    ------
test                                              .. The test
directory for the test case
                                  |
                                 +
AndroidManifest.xml                              .. The manifest for
the test code
                                  |
                                  :
                                  :
 
+src                                                            .. The
test code for the smack library.

After I build both projects, I install them respectively on the
emulator, then I launch the test case by command:
$ adb shell am instrument -w org.jivesoftware.smack.test/
android.test.InstrumentationTestRunner

then console output following information:
$INSTRUMENTATION_RESULT: shortMsg=org.jivesoftware.smack.LoginTest
$INSTRUMENTATION_RESULT: longMsg=java.lang.VerifyError:
org.jivesoftware.smack.LoginTest
$INSTRUMENTATION_CODE: 0

I think there is something wrong with the test case then I check with
command:

$adb logcat

I found following error message in the log:
:
:
D/AndroidRuntime( 1216): --- registering native functions ---
D/ActivityManager(  564): Uninstalling process
org.jivesoftware.smack.test
I/ActivityManager(  564): Start proc org.jivesoftware.smack.test for
added application org.jivesoftware.smack.test: pid=1223 uid=10019 gids=
{}
W/dalvikvm( 1223): VFY: unable to find class referenced in signature
(Lorg/jivesoftware/smack/XMPPConnection;)
E/dalvikvm( 1223): Could not find method
org.jivesoftware.smack.XMPPConnection.connect, referenced from method
org.jivesoftware.smack.LoginTest.testInvalidLogin
W/dalvikvm( 1223): VFY: unable to resolve virtual method 176: Lorg/
jivesoftware/smack/XMPPConnection;.connect ()V
:
It seems there is something wrong for the dalvik to resolve the
connect method in the org.jivesoftware.smack package, so I type the
command

$ adb shell dexdump -d -f -h /data/dalvik-cache/
d...@app@org.jivesoftware.smack....@classes.dex | grep XMPPConnection

then, I find following information in output
    #4              : (in Lorg/jivesoftware/smack/XMPPConnection;)
013130:                                        |[013130]
org.jivesoftware.smack.XMPPConnection.connect:()V

It seems that the XMPPConnection class with its method have been
install properly already.



--~--~---------~--~----~------------~-------~--~----~



VFY: unable to find class referenced in signature

by hefeng » Tue, 07 Jul 2009 00:07:21 GMT


 Hello,

I try to port the XMPP library to android sdk 1.5, follow the demo
ApiDemo from the sdk,  I created a directory structure something like
below for two packages org.jivesoftware.smack &
org.jivesoftware.smack.test :

      smack--+AndroidManifest.xml               ..The manifest for
package org.jivesoftware.smack

                    |
 
+src                                                 ..The source code
for the smack
                    :
                    :
                    ------
test                                          .. The test directory
for the test case
                                  |
                                 + AndroidManifest.xml              ..
The manifest for the package   org.jivesoftware.smack.test
                                  |
                                  :
                                  :
 
+src                                                            .. The
test code for the smack library.

After I build both projects, I install both package respectively on
the emulator, then I try to launch the test case by command:
$ adb shell am instrument -w org.jivesoftware.smack.test/
android.test.InstrumentationTestRunner

then console output following information:
$INSTRUMENTATION_RESULT: shortMsg=org.jivesoftware.smack.LoginTest
$INSTRUMENTATION_RESULT: longMsg=java.lang.VerifyError:
org.jivesoftware.smack.LoginTest
$INSTRUMENTATION_CODE: 0

I think there is something wrong with the test case then I check with
command:

$adb logcat

I found following error message in the log:
:
:
D/AndroidRuntime( 1216): --- registering native functions ---
D/ActivityManager(  564): Uninstalling process
org.jivesoftware.smack.test
I/ActivityManager(  564): Start proc org.jivesoftware.smack.test for
added application org.jivesoftware.smack.test: pid=1223 uid=10019 gids=
{}
W/dalvikvm( 1223): VFY: unable to find class referenced in signature
(Lorg/jivesoftware/smack/XMPPConnection;)
E/dalvikvm( 1223): Could not find method
org.jivesoftware.smack.XMPPConnection.connect, referenced from method
org.jivesoftware.smack.LoginTest.testInvalidLogin
W/dalvikvm( 1223): VFY: unable to resolve virtual method 176: Lorg/
jivesoftware/smack/XMPPConnection;.connect ()V
:
It seems there is something wrong for the dalvik to resolve the
connect method in the org.jivesoftware.smack package, so I type the
command

$ adb shell dexdump -d -f -h /data/dalvik-cache/
d...@app@org.jivesoftware.smack....@classes.dex | grep XMPPConnection

then, I find following information in output
    #4              : (in Lorg/jivesoftware/smack/XMPPConnection;)
013130:                                        |[013130]
org.jivesoftware.smack.XMPPConnection.connect:()V

It seems that the XMPPConnection class with its method have been
install properly already, then I lost ideal how to finger out the
problem, please give me a hand, any comments are appreciated.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


VFY: unable to find class referenced in signature

by fadden » Tue, 07 Jul 2009 03:41:15 GMT


 


I'd guess that the org.jivesoftware.smack.apk file is not present in
the process responding to the instrumentation test request.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Are ArrayList / Hashtable's bad for gc on Android?

I notice in the source code they are not used in critical loops, e.g.
in View.java :
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/view/ViewGroup.java;h=e686d1c20bd21eaa050ff3bf9187b549ee7b1355;hb=HEAD

I can see this kind of code which would be much easier implemented as
an ArrayList :

1867     private void addInArray(View child, int index) {
1868         View[] children = mChildren;
1869         final int count = mChildrenCount;
1870         final int size = children.length;
1871         if (index == count) {
1872             if (size == count) {
1873                 mChildren = new View[size +
ARRAY_CAPACITY_INCREMENT];
1874                 System.arraycopy(children, 0, mChildren, 0,
size);
1875                 children = mChildren;
1876             }
1877             children[mChildrenCount++] = child;
1878         } else if (index < count) {
1879             if (size == count) {
1880                 mChildren = new View[size +
ARRAY_CAPACITY_INCREMENT];
1881                 System.arraycopy(children, 0, mChildren, 0,
index);
1882                 System.arraycopy(children, index, mChildren,
index + 1, count - index);
1883                 children = mChildren;
1884             } else {
1885                 System.arraycopy(children, index, children, index
+ 1, count - index);
1886             }
1887             children[index] = child;
1888             mChildrenCount++;
1889         } else {
1890             throw new IndexOutOfBoundsException("index=" + index
+ " count=" + count);
1891         }
1892     }
--~--~---------~--~----~------------~-------~--~----~

2. Porting android to new HW device

Dear all,

I tried to porting the android in a new HW, but it seems that I cannot
do screen orientation even I changed the "android:screenOrientation"
parameter in Browser's manifest file after I boot up from new device.

I am a developer of application, and do not have much knowledge about
"how to do display orientation(landscape/portrait mode)." except call
setRequestOrientation() or change the "android:screenOrientation"
parameter.

Can anyone give me some advice or tips where did the android do the
display orientation? It can finish this work just in "Skia library" or
I need to modify my HW's graphic driver to support it?

I trace the code to SurfaceFlinger and see it use Skia library to do
the rotation. Besides, I see goldfish_fb.c do the rotation, too. But I
cannot connect the Skia's code with low level's graphic driver
together. ><

Thanks.
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. WebView with Gears:

4. Which one scales with the screen... Dip, sp, px.....?

5. Android Touch Inputs via adb

6. Audio SetParameter() use

7. Static librari is not linking with functions like abs, sincos etc.