Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development > Developer 101

Developer 101 101 Tutorials



Reply
 
LinkBack Thread Tools
Old November 10th, 2011, 07:37 AM   #1 (permalink)
New Member
 
Join Date: Nov 2011
Posts: 1
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default missing target class to test in my test application

Hi all,
I have a project (that compiles and runs in the emulator.)
I have a test project that tests part of this project. This test project also compiles with no problems, but when I try to run (test) it in the emulator, I get a NoClassDefFoundError exception on one of the classes my test class tests (I hope that made sense!) when it starts to run in the emulator. This is coming out of the adb log.
I looked in the bin directory (of the test project) for the missing class, but could not find it... Should it be there?
I found no reference (apk, etc) of the project I am trying to test either in the test projects bin directory.
How does the test project get the classes it needs to test against (in the classpath, I assume.) How do the tested classes get moved to the emulator?
I did try running the app before testing, so I know it is installed and runs correctly.
BTW, I am using netbeans with the nbandroid plugin.

thanks for any suggestions or help you may have.
Jordan

jordanthompson is offline  
Reply With Quote
Sponsors
Old November 11th, 2011, 06:48 PM   #2 (permalink)
Premium Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
 
Device(s): Galaxy Nexus GSM
Thanks: 2
Thanked 37 Times in 33 Posts
Default

I've never used Netbeans to do Android development. With Eclipse, I have a second test project which is linked to my main project as a dependent project in the java build path. This causes the .class files of my main project to be included in the .dex file of my test project when my test project builds. I can run the test project's .apk without having my main project's .apk installed on my emulator because basically my main project's .apk is included in my test project's .apk.

I would check you Netbeans build setup to ensure you main project's classes, resources, etc. and being including in your test project when your test project is built.

Perhaps this link might help you: Testing from Other IDEs | Android Developers It doesn't include any explicit information on Netbeans, but it might get you started.
jiminaus is offline  
Reply With Quote
Reply

Bookmarks

Tags
nbandroid, netbeans, testing


Go Back   Android Forums > Android Development > Application Development > Developer 101 User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 08:13 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo