Error message: ' ... ' is not assignable to Android.app.Activity Manifest XML

Source: Internet
Author: User

1 Problem Description:

For this piece of code:

<activity android:name= ". Fragament.fragment_bulter"/>
<activity android:name= ". Fragament.fragment_girl"/>
<activity android:name= ". Fragament.fragment_user"/>
<activity android:name= ". Fragament.fragment_wechat" >

</activity>

AndroidManifest.xml 中出现提示:‘com.example.cheung.……‘ is not assignable to Android.app.Activity Manifest XML   

Workaround:

returning to view the Fragment_bulter,fragment_girl,fragment_user,fragment_wechat function definition is actually inherited by fragment, which means that The code actually adds fragment to the activity, which naturally makes an error.

Workaround one: To retain several functions for fragment ,则 theAndroidManifest.xml中直接删掉这段即可

Workaround two: To AndroidManifest.xml retain several functions as activity, the

public class Fragment_bulter extends fragment{...}
Switch
fragmentactivity {......}
Result: Resolved

Error message: ' ... ' is not assignable to Android.app.Activity Manifest XML

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.