syedasad2001
Aspiring developer
Profile
Posts: 38
Reg: May 12, 2014
Karachi
380
06/13/14 01:45 PM (10 years ago)

Error using Eclipse: Type case expressions must be constant expressions

Folks, I am down to one last error while assembling my app in Eclipse. The error says : Description Resource Path Location Type case expressions must be constant expressions BT_plugin_success.java /wellchildclinic/src/com/wellchildclinic line 85 Java Problem The associated code which is brought up upon clicking the error is //figure out what method... switch (itemId){ case R.id.successImage: this.wobbleImage(); return; } Will be grateful for your help in fixing this problem. Thanks so much.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/13/14 05:17 PM (10 years ago)
BT_plugin_success.java is sort of a built in 'test' that can let you know you've build your project in Eclipse correctly. It is not used for anything else. Try commenting out the lines and see if that helps. It won't be playing a part in your overall project, so it won't hurt anything. Cheers! -- Smug
 
syedasad2001
Aspiring developer
Profile
Posts: 38
Reg: May 12, 2014
Karachi
380
like
06/13/14 11:40 PM (10 years ago)
Thanks so much. I deleted and then re-downloaded the android zipped file and this time it worked.
 
SrikarSree
Aspiring developer
Profile
Posts: 79
Reg: Jul 22, 2012
Bangalore
7,090
like
11/08/14 12:18 AM (9 years ago)
Hi Syedasad Can you tell where and what you deleted, since i am not able to find the file BT_plugin_success.java in the control panel. I removed the file for the downloaded zip, but gives lot more errors.
 
beto
Aspiring developer
Profile
Posts: 14
Reg: May 05, 2014
Quito
8,740
like
11/24/14 06:25 PM (9 years ago)
Hi Everybody. Same problem: 3 case expressions must be constant expressions error. In Eclipse I had those errors in App_rater plugin. In the App rater java file, below the //handle buttons clicks comment, there is: line 127: case R.id.btnLike: line 137: case R.id.btnDislike: line 169: case R.id.btnLater: How can I solve this? Any help I would appreciate a lot, Thanks!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.