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. log buffer size?

how do i set the maximum log buffer size?

i see there is a "logcat -r ..." option, but it requires that i also specify
-f, which is the log file location. what's the location of the default
android log buffer file? poking around in the file system i can't see to
find it.

assuming i can find it, is it sufficient to do "logcat -r <n>kb -f <default
log location>?

thanks.

-- 

2. NexusOne AudioRecord Randomly goes to standby

Hey I was browsing thru that code and saw this

bool AudioFlinger::MixerThread::threadLoop()

1190 {

1191     int16_t* curBuf = mMixBuffer;

1192     Vector< sp<Track> > tracksToRemove;

1193     uint32_t mixerStatus = MIXER_IDLE;

1194     nsecs_t standbyTime = systemTime();

1195     size_t mixBufferSize = mFrameCount * mFrameSize;

1196     // FIXME: Relaxed timing because of a certain device that
can't meet latency

1197     // Should be reduced to 2x after the vendor fixes the driver
issue

1198     nsecs_t maxPeriod = seconds(mFrameCount) / mSampleRate * 3;

1199     nsecs_t lastWarning = 0;

1200     bool longStandbyExit = false;

1201     uint32_t activeSleepTime = activeSleepTimeUs();

1202     uint32_t idleSleepTime = idleSleepTimeUs();

1203     uint32_t sleepTime = idleSleepTime;

1204

1205     while (!exitPending())

1206     {

1207         processConfigEvents();

1208

1209         mixerStatus = MIXER_IDLE;

1210         { // scope for mLock

1211

1212             Mutex::Autolock _l(mLock);

1213

1214             if (checkForNewParameters_l()) {

1215                 mixBufferSize = mFrameCount * mFrameSize;

1216                 // FIXME: Relaxed timing because of a certain
device that can't meet latency

1217                 // Should be reduced to 2x after the vendor fixes
the driver issue

1218                 maxPeriod = seconds(mFrameCount) / mSampleRate *
3;

1219                 activeSleepTime = activeSleepTimeUs();

1220                 idleSleepTime = idleSleepTimeUs();

1221             }

1222

1223             const SortedVector< wp<Track> >& activeTracks =
mActiveTracks;

1224

1225             // put audio hardware into standby after short delay

1226             if UNLIKELY((!activeTracks.size() && systemTime() >
standbyTime) ||

1227                         mSuspended) {

1228                 if (!mStandby) {

1229                     LOGV("Audio hardware entering standby, mixer
%p, mSuspended %d\n", this, mSuspended);

1230                     mOutput->standby();

1231                     mStandby = true;

1232                     mBytesWritten = 0;




First they have a comment about a vendor bug with buffer latency -
then they have a macro called UNLIKELY that puts the mixer to
sleep....maybe it's happening in here...?





> 

3. Peta Indonesia untuk Sygic versi September 2009

4. Need help understanding the ContentObserver life-cycle.

5. Cara Setting GPRS Telkomsel

6. Your content must have a ListView whose id attribute is 'android.R.id.list' Problem

7. HP lokal ber Android