Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
my app force shut down.
the log cat error is-
10-07 01:02:11.773: E/AndroidRuntime(2305): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.semester/com.example.semester.Submit}: java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.String
10-07 01:02:11.773: E/AndroidRuntime(2305): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
Posted

1 solution

The message is quite clear, you cannot cast one type to something totally different. If the variable is a float type then you must pass it as a float. See http://developer.android.com/reference/android/content/Intent.html#putExtra(java.lang.String, float)[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900