To reference your button in your MainActivity class as in your original 
post. In your activity_main.xml you should have something like this...

<Button
android:id="@+id/send"
// the rest of your button code here
/>

it appears as though this id was under an ImageView tag rather than a 
button tag.

-JF


On Thursday, June 16, 2016 at 7:41:06 AM UTC-4, Rajdeep Roy wrote:
>
> Done ! but no R file and no errors are showing up as well !!
>
> On Thursday, June 16, 2016 at 5:03:40 PM UTC+5:30, sardar khan wrote:
>>
>> Rebuild the Project 
>>
>> On Thu, Jun 16, 2016 at 4:15 PM, Rajdeep Roy <[email protected]> wrote:
>>
>>> Hi, 
>>> I put off the code with Imageview and the Button code is intact and it 
>>> does not error now BUT the R file is missing now from the java folder
>>> What to do with that?
>>>
>>> On Thursday, June 16, 2016 at 4:31:34 PM UTC+5:30, Rajdeep Roy wrote:
>>>>
>>>> @Sardar - Do u mean check out the "MainActivity.xml" ?? 
>>>>
>>>> On Thursday, June 16, 2016 at 4:28:58 PM UTC+5:30, sardar khan wrote:
>>>>>
>>>>> it shows that the in xml layout the id refer to ImageView kindly check 
>>>>> the layout 
>>>>>
>>>>> On Thu, Jun 16, 2016 at 3:45 PM, Rajdeep Roy <[email protected]> 
>>>>> wrote:
>>>>>
>>>>>> Hello Everyone, 
>>>>>> I am new to Android Programming and I am stuck at a point where it 
>>>>>> shows up "Unexpected Cast to the Button" 
>>>>>> I am attaching screenshot of my existing codes, kindly have a look at 
>>>>>> it. 
>>>>>> If required I can provide the sample codes as well. 
>>>>>> I look forward with some positive responses. 
>>>>>> Thanks & Regards
>>>>>>
>>>>>> -- 
>>>>>>
>>>>>>
>>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Android Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/android-developers.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/android-developers/0470d742-f7e3-478b-8c2b-194de325bab2%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/android-developers/0470d742-f7e3-478b-8c2b-194de325bab2%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/337578da-0d25-4250-bca4-d2e644976cf6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to