Android Studio does not recognize the support.v4.app.FragmentTabHost issue.

Source: Internet
Author: User

Using Android Studio to implement the bottom tab function, the same code in Eclipse is not a problem, and now in the preview of as inside always error: Exception raised during Rendering:no tab known for tag Null

The XML source code is as follows:

<?xml version= "1.0" encoding= "Utf-8"? ><linearlayout xmlns:android= "http://schemas.android.com/apk/res/ Android "Android:layout_width=" Fill_parent "android:layout_height=" fill_parent "android:orientation=" vertical "&G    T <framelayout android:id= "@+id/realtabcontent" android:layout_width= "Fill_parent" android:layout_he ight= "0dip" android:layout_weight= "1"/> <view android:layout_width= "Fill_parent" Android:la yout_height= "0.5DP" android:background= "#BFBFBF"/> <android.support.v4.app.fragmenttabhost Android : id= "@android: Id/tabhost" android:layout_width= "fill_parent" android:layout_height= "Wrap_content" and            roid:background= "@drawable/maintab_bg" > <framelayout android:id= "@android: Id/tabcontent" Android:layout_width= "0DP" android:layout_height= "0DP" android:layout_weight= "0"/> </an Droid.support.v4.app.FragmentTabhost></linearlayout> 

Gradle quoted the V7 package

Apply plugin: ' Com.android.application ' android {    compilesdkversion    buildtoolsversion "22.0.1"    defaultconfig {        ApplicationID "*************"        minsdkversion        targetsdkversion        1        Versionname "1.0"    }    Buildtypes {        Release {            minifyenabled false            proguardfiles getdefaultproguardfile (' Proguard-android.txt '), ' Proguard-rules.pro '        }    }}dependencies {    compile filetree (dir: ' Libs ', Include: [' *.jar '])    testcompile ' junit:junit:4.12 '    compile ' com.android.support:appcompat-v7:22.2.1 '    compile ' com.android.support:design:22.2.1 '    compile ' com.jakewharton:butterknife:7.0.1 '}

  

Android Studio does not recognize the support.v4.app.FragmentTabHost issue.

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.