stephenwang1011 / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

Problem with devices with andorid 1.6 sdk #320

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The newest Robotium doesn't work with 1.6v android Devices. It's break by 
constructor when Waiter is loading by classloader because of lacking one 
method. Problem probably appeared after Android.jar 4 was included and method 
for fragment started to use - but problem is only on those devices with 1.6 - 
seems that this old DVM breaks application when only find method which cannot 
be found(even if this method is not in use - as I mentioned - it's happening by 
loading class).

This is snippet of logs:
08-31 13:44:14.516 E/dalvikvm( 608): Could not find method 
android.app.Activity.getFragmentManager, referenced from method 
com.jayway.android.robotium.solo.Waiter.getFragment
08-31 13:44:14.516 W/dalvikvm( 608): VFY: unable to resolve virtual method 5: 
Landroid/app/Activity;.getFragmentManager ()Landroid/app/FragmentManager;
08-31 13:44:14.516 W/dalvikvm( 608): VFY: rejecting opcode 0x6e at 0x0008
08-31 13:44:14.516 W/dalvikvm( 608): VFY: rejected 
Lcom/jayway/android/robotium/solo/Waiter;.getFragment 
(Ljava/lang/String;I)Landroid/app/Fragment;
08-31 13:44:14.516 W/dalvikvm( 608): Verifier rejected class 
Lcom/jayway/android/robotium/solo/Waiter;
08-31 13:44:14.526 I/TestRunner( 608): failed: 
testRecorded(com.bitbar.testdroid.test.WebViewActivityTest)
08-31 13:44:14.526 I/TestRunner( 608): ----- begin exception -----
08-31 13:44:14.576 I/TestRunner( 608): 
08-31 13:44:14.576 I/TestRunner( 608): java.lang.VerifyError: 
com.jayway.android.robotium.solo.Waiter
08-31 13:44:14.576 I/TestRunner( 608):     at 
com.jayway.android.robotium.solo.Solo.<init>(Solo.java:115)
08-31 13:44:14.576 I/TestRunner( 608):     at 
com.bitbar.recorder.extensions.ExtSolo.<init>(ExtSolo.java:90)
08-31 13:44:14.576 I/TestRunner( 608):     at 
com.bitbar.testdroid.test.WebViewActivityTest.setUp(WebViewActivityTest.java:21)
08-31 13:44:14.576 I/TestRunner( 608):     at 
junit.framework.TestCase.runBare(TestCase.java:125)
08-31 13:44:14.576 I/TestRunner( 608):     at 
junit.framework.TestResult$1.protect(TestResult.java:106)
08-31 13:44:14.576 I/TestRunner( 608):     at 
junit.framework.TestResult.runProtected(TestResult.java:124)
08-31 13:44:14.576 I/TestRunner( 608):     at 
junit.framework.TestResult.run(TestResult.java:109)
08-31 13:44:14.576 I/TestRunner( 608):     at 
junit.framework.TestCase.run(TestCase.java:118)
08-31 13:44:14.576 I/TestRunner( 608):     at 
android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:164)
08-31 13:44:14.576 I/TestRunner( 608):     at 
android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:151)
08-31 13:44:14.576 I/TestRunner( 608):     at 
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:42
5)
08-31 13:44:14.576 I/TestRunner( 608):     at 
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1520)
08-31 13:44:14.576 I/TestRunner( 608): ----- end exception -----
08-31 13:44:14.616 I/TestRunner( 608): finished: 
testRecorded(com.bitbar.testdroid.test.WebViewActivityTest)

Original issue reported on code.google.com by Krzyszto...@bitbar.com on 3 Sep 2012 at 9:12

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. I am not sure what we can do about it except break 
compatibility with Android-4. Lets investigate this and see if we find a 
solution.

Original comment by renasr...@gmail.com on 3 Sep 2012 at 11:33

GoogleCodeExporter commented 9 years ago
Unfortunately there is nothing that can be done to keep backwards compatibility 
with Android-4. I would advice you to use 3.3 for older versions. 

Original comment by renasr...@gmail.com on 11 Oct 2012 at 5:10