tag:blogger.com,1999:blog-25456655.post3056441835219369264..comments2024-02-09T11:53:32.369-05:00Comments on Diego Torres Milano's blog: Android Testing: External librariesDiego Torres Milanohttp://www.blogger.com/profile/12030778501784140349noreply@blogger.comBlogger27125tag:blogger.com,1999:blog-25456655.post-83329304776477719842022-04-25T04:09:59.703-04:002022-04-25T04:09:59.703-04:00Bubble Shooter Games 2 has lots of bubbles, pro co...Bubble Shooter Games 2 has lots of bubbles, pro color and ball shooting games in 2022. <a href="https://play.google.com/store/apps/details?id=com.malikgames.bubbleshooter" rel="nofollow">Bubble Shooter Classic</a> is best played with pro friends. Match 3 to pop origin bubbles. This new game is first launched in 2022 game.<br />LyricsKubehttps://www.blogger.com/profile/01094761795230597031noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-32709318331856634172022-04-12T13:15:15.536-04:002022-04-12T13:15:15.536-04:00Excellent Blog! I would like to thank you for the ...Excellent Blog! I would like to thank you for the efforts you have made in writing this post.<br /><a href="https://www.baccaratsite.biz/" title="바카라사이트" rel="nofollow">바카라사이트</a><br />baccaratsite•bizhttps://www.blogger.com/profile/03146068028933738724noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-85757598289154102172022-03-04T00:12:13.304-05:002022-03-04T00:12:13.304-05:00I am here now and would just like to say thanks fo...I am here now and would just like to say thanks for a remarkable post and a all-round enjoyable blog (I also love the theme/design), I don’t have time to look over it all at the minute but I have saved it and also added your RSS feeds, so when I have time I will be back to read much more, Please do keep up the superb job. Checkout my blog <a href="https://trickscage.net/" rel="nofollow">Trickscage</a><br />Andrew Brewhttps://www.blogger.com/profile/15996216128041208008noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-41417095254119901202022-01-22T12:10:01.440-05:002022-01-22T12:10:01.440-05:00I really like your writing so so much! percentage ...I really like your writing so so much! percentage we keep in touch more about your post on AOL? I require a specialist in this house to solve my problem. May be that is you! Having a look ahead to peer you. <a href="https://www.baccaratsite.biz" title="온라인카지노" rel="nofollow">온라인카지노</a><br /><br />baccaratsite.bizhttps://www.blogger.com/profile/03808780471081885315noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-38778837782536515352021-11-22T12:05:14.168-05:002021-11-22T12:05:14.168-05:00windows 11 pro 64 bit product key crack
jump force...<a href="https://windows11productkey.org/windows-11-pro-64-bit-product-key/" rel="nofollow">windows 11 pro 64 bit product key crack</a><br /><a href="https://pcgamerholic.com/jump-force-pc-gameplay-download/" rel="nofollow">jump force pc gameplay download</a><br /><a href="https://trialsolution.co/tag/avast-premier-antivirus/feed/" rel="nofollow">avast premier antivirus crack</a><br /><a href="https://trialsolution.co/tag/avast-premier-activation-license-file/feed/" rel="nofollow">avast premier activation license file</a><br /><a href="https://trialsolution.co/tag/dameware-mini-remote-control-buy/feed/" rel="nofollow">dameware mini remote control</a><br /><a href="http://windows11productkey.org/windows-11-pro-product-key-2016/" rel="nofollow">windows 11 pro product key</a>Davidhttps://www.blogger.com/profile/17558216021902761834noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-75713384821659375532012-09-25T01:35:08.404-04:002012-09-25T01:35:08.404-04:00@Qiao Feng,
I can't reproduce your problem.
Fo...@Qiao Feng,<br />I can't reproduce your problem.<br />For me it's working correctly either from Eclipse or from ant.<br /><br />You should not have android-support library in your test project's libs directory. Perhaps this is the reason why it's failing.<br /><br /><br />Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-75364596752719239092012-09-24T06:01:09.133-04:002012-09-24T06:01:09.133-04:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/01747744780012449878noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-51427561678580876482012-09-24T06:00:23.772-04:002012-09-24T06:00:23.772-04:00Hi,
I try to use ant to run Android JUnit test wi...Hi,<br /><br />I try to use ant to run Android JUnit test with android-support-v4.jar since I am using FragmentActivity. <br />I add a link with command "ln ../testedProject/libs/android-support-v4.jar ./libs/android-support-v4.jar" in my test project. The build can be passed but there is still error when running the test case as below:<br /><br />[exec] android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests:<br /> [exec] Error in testSuiteConstructionFailed:<br /> [exec] java.lang.RuntimeException: Exception during suite construction<br /> [exec] at android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests.testSuiteConstructionFailed(TestSuiteBuilder.java:239)<br /> [exec] at java.lang.reflect.Method.invokeNative(Native Method)<br /> [exec] at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)<br /> [exec] at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)<br /> [exec] at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:520)<br /> [exec] at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)<br /> [exec] Caused by: java.lang.reflect.InvocationTargetException<br /> [exec] at com.test.QuestionListActivityTest.(QuestionListActivityTest.java:17)<br /> [exec] at java.lang.reflect.Constructor.constructNative(Native Method)<br /> [exec] at java.lang.reflect.Constructor.newInstance(Constructor.java:446)<br /> [exec] at android.test.suitebuilder.TestMethod.instantiateTest(TestMethod.java:87)<br /> [exec] at android.test.suitebuilder.TestMethod.createTest(TestMethod.java:73)<br /> [exec] at android.test.suitebuilder.TestSuiteBuilder.addTest(TestSuiteBuilder.java:263)<br /> [exec] at android.test.suitebuilder.TestSuiteBuilder.build(TestSuiteBuilder.java:185)<br /> [exec] at android.test.InstrumentationTestRunner.onCreate(InstrumentationTestRunner.java:373)<br /> [exec] at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4218)<br /> [exec] at android.app.ActivityThread.access$3000(ActivityThread.java:125)<br /> [exec] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)<br /> [exec] at android.os.Handler.dispatchMessage(Handler.java:99)<br /> [exec] at android.os.Looper.loop(Looper.java:123)<br /> [exec] at android.app.ActivityThread.main(ActivityThread.java:4627)<br /> [exec] at java.lang.reflect.Method.invokeNative(Native Method)<br /> [exec] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)<br /> [exec] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)<br /> [exec] at dalvik.system.NativeStart.main(Native Method)<br /> [exec] Caused by: java.lang.NoClassDefFoundError: com.activity.QuestionListActivity<br /><br />The test can be run with Eclipse successfully, but it will always failed as above with ant command.<br />Does anybody know how to solve it?Anonymoushttps://www.blogger.com/profile/01747744780012449878noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-88272196107504555012012-03-01T23:11:09.953-05:002012-03-01T23:11:09.953-05:00I haven't tried to use guava in the test proje...I haven't tried to use guava in the test project. I will do it and see if there could be any solution or workaround.<br />As a last resort, remember that building with <b>ant</b> works in these cases.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-50767047393541099112012-02-29T03:27:32.903-05:002012-02-29T03:27:32.903-05:00I have the same problem as Timbav.
The solution t...I have the same problem as Timbav. <br />The solution to declare guava dependency as provided works, but you cannot use guava classes in the test project. <br />Is there a good tutorial to handle this problem with maven?Loriehttps://www.blogger.com/profile/15959421897533890651noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-2067675891759656082011-09-12T09:01:56.275-04:002011-09-12T09:01:56.275-04:00TimBav, you are my hero of the day. Indeed, your h...TimBav, you are my hero of the day. Indeed, your hint to use a dependency with provided solved my NoClassDefFoundError in a maven test project, testing a fragment activity from the compatibility support library.<br /><br />To be more clear, in case someone else bumps into this:<br /><br />In the main project, I added the dependency as follows:<br /><br /> <dependency><br /> <groupId>android.support</groupId><br /> <artifactId>compatibility-v4</artifactId><br /> </dependency><br /><br /><br /><br />and in the test project, like this:<br /><br /><br /> <dependency><br /> <groupId>android.support</groupId><br /> <artifactId>compatibility-v4</artifactId><br /> <scope>provided</scope><br /> </dependency><br /><br />Thanks!marc1shttps://www.blogger.com/profile/07549110914964026574noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-45217737377316991102011-09-12T08:58:28.684-04:002011-09-12T08:58:28.684-04:00This comment has been removed by the author.marc1shttps://www.blogger.com/profile/07549110914964026574noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-27856789675366547292011-08-02T06:47:38.164-04:002011-08-02T06:47:38.164-04:00Thanks a lot Diego Torres Milano. You helped me a ...Thanks a lot Diego Torres Milano. You helped me a lot.Sachinhttps://www.blogger.com/profile/07879795520720638515noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-18242114965303843552011-08-01T18:50:28.263-04:002011-08-01T18:50:28.263-04:00Thanks all for your comments.
I updated the post t...Thanks all for your comments.<br />I updated the post to include an example of building android projects with ant and including external libraries that may be used in the tests as well.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-1351506135055565072011-08-01T11:46:24.437-04:002011-08-01T11:46:24.437-04:00+1 thanks for this solution for eclipse, but is th...+1 thanks for this solution for eclipse, but is there also a solution for building with ant as well?<br />e.g.<br />App project, library project and test project all depend on an external jar.<br />The test project includes the external jar in build.properties with the line <i>jar.libs.dir=...</i> so that it can compile.<br />Everything builds OK, but when trying to run a test case with adb, then will also then get the IllegalAccessError <i>Class ref in pre-verified class resolved to unexpected implementation</i>.David Wonghttps://www.blogger.com/profile/01014541929342695597noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-22650923189174590432011-07-20T23:26:01.983-04:002011-07-20T23:26:01.983-04:00Wow, this is the exact solution that I have been f...Wow, this is the exact solution that I have been found. Thanks a lot.OpenYourDreamhttps://www.blogger.com/profile/12246694179106453535noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-53758394044135403062011-07-20T09:39:58.481-04:002011-07-20T09:39:58.481-04:00This comment has been removed by the author.jlitzingIhttps://www.blogger.com/profile/14231127258350380848noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-77064833710058642852011-06-29T12:34:02.078-04:002011-06-29T12:34:02.078-04:00I build with Maven, and my app uses Guava:
...I build with Maven, and my app uses Guava:<br /><br /> <dependency><br /> <groupId>com.google.guava</groupId><br /> <artifactId>guava</artifactId><br /> <version>r09</version><br /> <scope>compile</scope><br /> </dependency><br /><br />My instrumentation tests kept throwing this exception in the <clinit> phase of a class the code under test depended on:<br /><br />Caused by: java.lang.IllegalAccessError: cross-loader access from pre-verified class<br /> at dalvik.system.DexFile.defineClass(Native Method)<br /> at dalvik.system.DexFile.loadClass(DexFile.java:193)<br /> at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)<br /> at java.lang.ClassLoader.loadClass(ClassLoader.java:573)<br /> at java.lang.ClassLoader.loadClass(ClassLoader.java:532)<br /><br />I was able to resolve this by either adding Guava as an <exclusion>, or -- what is probably the correct solution -- by declaring the APK dependency with <scope>provided</scope> instead of the default scope that most Android test examples suggest.TimBavhttps://www.blogger.com/profile/00547040951985244624noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-30849226854446841172011-06-29T11:57:23.803-04:002011-06-29T11:57:23.803-04:00Start with a very simple project, a Helloworld lik...Start with a very simple project, a Helloworld like project would help, follow the steps, post any problem.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-968054740869283802011-06-29T07:35:08.952-04:002011-06-29T07:35:08.952-04:00I did what you mentioned, but still hitting the sa...I did what you mentioned, but still hitting the same issue. :(DeepThoughtshttps://www.blogger.com/profile/02421684679229940835noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-61520042507822698752011-06-08T13:12:27.408-04:002011-06-08T13:12:27.408-04:00Thanks for your comments.Thanks for your comments.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-31871087460030890312011-06-07T17:24:32.886-04:002011-06-07T17:24:32.886-04:00You are a lifesaver man.You are a lifesaver man.Anonhttps://www.blogger.com/profile/07499469579591459741noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-91601924550223349042011-03-11T14:56:35.285-05:002011-03-11T14:56:35.285-05:00Thank you very much.Thank you very much.Jonas Alveshttps://www.blogger.com/profile/15596429223175818541noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-35044101279195092542011-03-01T12:40:57.878-05:002011-03-01T12:40:57.878-05:00Thanks for your comments. I'm glad to hear tha...Thanks for your comments. I'm glad to hear that it helped you.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-66254910520521802432011-02-28T16:09:23.022-05:002011-02-28T16:09:23.022-05:00Thanks a lot for your hints. I could not find the ...Thanks a lot for your hints. I could not find the solution easily, as Eclipse only reported 'Test run failed: java.lang.IllegalAccessError' and that's all.Anonymousnoreply@blogger.com