stephenwang1011 / robotium

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

Fails with SDK rev. 17 #237

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Update android SDK Tools into rev. 17
2. Run tests with solo

What is the expected output? What do you see instead?
Test should success like with before update into rev.17. But instead we has:
03-23 08:43:25.540: I/TestRunner(2881): java.lang.NoClassDefFoundError: 
com.jayway.android.robotium.solo.Solo
03-23 08:43:25.540: I/TestRunner(2881):     at 
ru.infteh.organizer.test.TaskEditActivityTest.tearDown(TaskEditActivityTest.java
:75)
03-23 08:43:25.540: I/TestRunner(2881):     at 
junit.framework.TestCase.runBare(TestCase.java:130)
03-23 08:43:25.540: I/TestRunner(2881):     at 
junit.framework.TestResult$1.protect(TestResult.java:106)
03-23 08:43:25.540: I/TestRunner(2881):     at 
junit.framework.TestResult.runProtected(TestResult.java:124)
03-23 08:43:25.540: I/TestRunner(2881):     at 
junit.framework.TestResult.run(TestResult.java:109)
03-23 08:43:25.540: I/TestRunner(2881):     at 
junit.framework.TestCase.run(TestCase.java:118)
03-23 08:43:25.540: I/TestRunner(2881):     at 
android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
03-23 08:43:25.540: I/TestRunner(2881):     at 
android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
03-23 08:43:25.540: I/TestRunner(2881):     at 
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:52
9)
03-23 08:43:25.540: I/TestRunner(2881):     at 
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1448)

What version of the product are you using? On what operating system?
ver 3.1, OS Windows 7, eclipse ide

Please provide any additional information below.

Original issue reported on code.google.com by karabara...@gmail.com on 23 Mar 2012 at 8:45

GoogleCodeExporter commented 9 years ago
Have you gotten it to work with earlier versions of the SDK?

Original comment by renasr...@gmail.com on 23 Mar 2012 at 9:31

GoogleCodeExporter commented 9 years ago
Yes it worked before, but it's failed after update SDK tools

Original comment by karabara...@gmail.com on 23 Mar 2012 at 9:35

GoogleCodeExporter commented 9 years ago
Please create a new rev 17 avd, and then try again. It seems as if Robotium jar 
is not transfered (with the test project) to the emulator and therefore you get 
the NoClassDefFoundError. 

Original comment by renasr...@gmail.com on 23 Mar 2012 at 9:46

GoogleCodeExporter commented 9 years ago
I create new AVD by new AVD manager rev.17 and had exactly the same exception.

Note that while tests is running and before NoClassDefFoundError there is such 
errors in LogCat:
03-23 10:21:18.511: E/dalvikvm(985): Could not find class 
'com.jayway.android.robotium.solo.Solo', referenced from method 
myapp.test.TaskEditActivityTest.testFields

Original comment by karabara...@gmail.com on 23 Mar 2012 at 10:25

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. I will have to take a look at it to see what the 
issue might be. 

Original comment by renasr...@gmail.com on 23 Mar 2012 at 10:27

GoogleCodeExporter commented 9 years ago
Please see:

http://stackoverflow.com/questions/9828722/verifyerror-in-android-test-project-b
uild-tools-v17

Original comment by renasr...@gmail.com on 26 Mar 2012 at 11:18

GoogleCodeExporter commented 9 years ago
thx, helped this:
http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17

Original comment by karabara...@gmail.com on 26 Mar 2012 at 11:37

GoogleCodeExporter commented 9 years ago
Works if you export all your referenced libraries, by going to Properties-> 
Java Build Path -> Order and Export ...then check all your imported jar files.  
Do the same in your project and test project.

Original comment by grnd...@gmail.com on 28 Mar 2012 at 10:37

GoogleCodeExporter commented 9 years ago
You are not suppose to export any libraries with r17. It does project 
dependencies automatically. One thing you have to be aware of is to not import 
libraries if your main project (project that's being tested on) already 
includes that library.
Do a dexdump if you are not sure

Original comment by vegito....@gmail.com on 4 Apr 2012 at 7:34

GoogleCodeExporter commented 9 years ago
This is working fine. Please refer to Comment 7 above for the URL
http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17

Original comment by anilredd...@gmail.com on 9 Apr 2012 at 1:07

GoogleCodeExporter commented 9 years ago
Issue 246 has been merged into this issue.

Original comment by renasr...@gmail.com on 13 Apr 2012 at 4:06

GoogleCodeExporter commented 9 years ago
I have "java.lang.NoClassDefFoundError: com.jayway.android.robotium.solo.Solo" 
exception running the robotium tests with SDK 17
Could you suggest smth to do with it ?

Original comment by tatajaja...@gmail.com on 17 Apr 2012 at 1:01

GoogleCodeExporter commented 9 years ago
@tatajaja88888888, Please see the previous comments.

Original comment by renasr...@gmail.com on 17 Apr 2012 at 1:03

GoogleCodeExporter commented 9 years ago
Issue 279 has been merged into this issue.

Original comment by renasr...@gmail.com on 15 Jun 2012 at 11:05

GoogleCodeExporter commented 9 years ago
It is a problem with ADT 17 and the way libraries are handled.

Simply put all the referred libraries in the "libs" PLURAL folder and be sure 
that they are added as android libraries and not as java libraries.

Original comment by michele.sama on 11 Jul 2012 at 10:39

GoogleCodeExporter commented 9 years ago

Original comment by renasr...@gmail.com on 7 Aug 2012 at 8:54

GoogleCodeExporter commented 9 years ago
i think it is not a problem of version 17

you can find solution here.

http://stackoverflow.com/questions/9875029/android-robotium-noclassdeffounderror

Original comment by vishal.v...@gmail.com on 24 Aug 2012 at 9:05

GoogleCodeExporter commented 9 years ago
lol

Original comment by taha.sta...@gmail.com on 28 Aug 2012 at 2:21