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. Why does my racing game not work???

I have been creating a simple little racing game for my computer
science coursework and well its broken whenever I run it in the
emulator it force closes, could you please check my code to see whats
wrong with it??
heres the code if you want the entire project I put it on
http://www.anddev.org/my_racing_game_wont_work-t12492.html thanks;

public class Draw extends Activity {
        public int dx;
    public int dy;
    public double Angle;
    private float mcarWidth;
    private float mcarHeight;
    public int mcarx;
    public int mcary;
    public int mx;
    public int my;
    public int[][] TrackCords;
    public boolean cord;
    public int i;
    Bitmap mCar;
    Bitmap mTrack1;
    Bitmap mTrack2;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        mCar = BitmapFactory.decodeResource(getResources(),
R.drawable.car);
        mTrack1 = BitmapFactory.decodeResource(getResources(),
R.drawable.track1);
        mTrack2 = BitmapFactory.decodeResource(getResources(),
R.drawable.track2);
        mcarWidth = mCar.getWidth();
        mcarHeight = mCar.getHeight();
        mx = 0;
        my = 0;
        setContentView(new Panel(this));
    }
    class Panel extends SurfaceView implements SurfaceHolder.Callback{
        private TilterThread mthread;

        public Panel(Context context) {
            super(context);
            getHolder().addCallback(this);
            mthread = new TilterThread(getHolder(), this);
        }
        @Override
        public void onMeasure(int widthMeasureSpec, int
heightMeasureSpec){
                dy = measureHeight(heightMeasureSpec);
                dx = measureWidth(widthMeasureSpec);
                mcarx = (int) (dx/2-mcarWidth/2);
                mcary = (int) (dy - mcarHeight);
                Angle =0;
                setMeasuredDimension(dx,dy);
        }
        private int measureHeight(int Measure) {
                int specSize = MeasureSpec.getSize(Measure);
                return specSize;
        }
        private int measureWidth(int Measure) {
                int specSize = MeasureSpec.getSize(Measure);
                return specSize;
        }
        public void TrackPosFinder(int mx, int my){
                cord = false;
                if (my >= 0)
                {
                        do
                        {
                                my -=100;
                                if (my >0){
                                        cord=true;
                                }
                        }
                        while (cord = false);
                }
                TrackCords[1][0]=mx;
                TrackCords[1][1]=my;
                cord = false;
                i = 1;
                do{
                        my +=100;
                        TrackCords[i][0]=mx;
                        TrackCords[i][1]=my;
                }
                while(cord = false);
        }
        @Override
        public void onDraw(Canvas canvas) {
                my += 1;
                TrackPosFinder(mx , my);
                for( i=0; i<TrackCords.length; i+=2)
                {
                        canvas.drawBitmap(mTrack1, 
TrackCords[i][0],TrackCords[i]
[1],null);
                        canvas.drawBitmap(mTrack2, 
TrackCords[i+1][0],TracCords[i+1]
[1],null);
                }
                canvas.rotate((float) Angle, (float) dy,(float) dx);
            canvas.drawColor(Color.BLACK);
            canvas.drawBitmap(mCar, mcarx, mcary, null);
        }
        @Override
        public void surfaceChanged(SurfaceHolder holder, int format,
int width, int height) {
            // TODO Auto-generated method stub

        }
        @Override
        public void surfaceCreated(SurfaceHolder holder) {
            mthread.setRunning(true);
            mthread.start();
        }
        @Override
        public void surfaceDestroyed(SurfaceHolder holder) {
            boolean retry = true;
            mthread.setRunning(false);
            while (retry) {
                try {
                    mthread.join();
                    retry = false;
                } catch (InterruptedException e) {
                }
            }
        }
        @Override
        public boolean onKeyDown(int keyCode, KeyEvent msg) {
                if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) {
                        Angle += -10;
                }
                if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) {
                        Angle += 10;
                }
                return (true);
        }
    }

    class TilterThread extends Thread {
        private SurfaceHolder msurfaceHolder;
        private Panel mpanel;
        private boolean mrun = false;
        public TilterThread(SurfaceHolder surfaceHolder, Panel panel)
{
            msurfaceHolder = surfaceHolder;
            mpanel = panel;
        }

        public void setRunning(boolean run) {
            mrun = run;
        }
        @Override
        public void run() {
            Canvas c;
            while (mrun) {
                c = null;
                try {
                    c = msurfaceHolder.lockCanvas(null);
                    synchronized (msurfaceHolder) {
                        mpanel.onDraw(c);
                    }
                } finally {
                    if (c != null) {
                        msurfaceHolder.unlockCanvasAndPost(c);
                    }
                  catch (InterruptedException e) {
                  }
                }
            }
        }
    }
}

-- 

2. Tanya rom magic 2.1 apps2sd

Guys,
Yg masih ngoprek htc magic, numpang tanya dong, sekarang rom magic yg eclair
dan support apps2sd rom yg mana ya?

Dah lama ninggalin magic, skrg lagi mau ngoprekin lagi :-)

TIA

Salam,

Lucky Sebastian

-- 
"Indonesian Android Community [id-android]" 

3. super.onResume() at beginning or end of method? Does it matter?

4. Paging androider Lampung

5. Ads in apps... How to successfully generate a larger revenue?

6. Langkah-langkah MengRoot

7. hangup outgoing call programmatically - is this even possible?