Android Studio中出现渲染问题,视图未显示

Android Studio中出现渲染问题,视图未显示,android,android-layout,android-fragments,Android,Android Layout,Android Fragments,这是我的毕业典礼,我在互联网上搜索了很多次,但我没有得到任何解决方案。我已经用了很多东西来解决问题,但我没有得到答案,请帮助我 apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion '25.0.0' dataBinding { enabled = true } defaultConfig { applicationId "com.android.applicati

这是我的毕业典礼,我在互联网上搜索了很多次,但我没有得到任何解决方案。我已经用了很多东西来解决问题,但我没有得到答案,请帮助我

apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
dataBinding { enabled = true }

defaultConfig {
    applicationId "com.android.application"
    minSdkVersion 16
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

repositories {
    mavenCentral()
    flatDir {
        dirs 'libs'
    }

}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
}
dependencies {
testCompile 'junit:junit:4.12'
compile 'cz.msebera.android:httpclient:4.4.1.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.+'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile(name: "truesdk-0.5", ext: "aar")
}
apply plugin: 'com.google.gms.google-services'

我也面临同样的问题。实际上,这个问题来自style.xml

  • Android的每个新版本都提供了新的API级别和新功能
  • 如果您正在关注某人的代码,并且他们正在使用类似extends ActionBarActivity或只是extends Activity的东西,那么对于他们编写时使用的SDK API来说,这很好
  • 当您启动一个新的空白活动(或在版本24中为空活动),并且您希望支持的最小API小于当前API时,Android将创建扩展AppCompatActivity的活动。Id这样做是为了支持较旧的API级别
  • 主题与活动扩展的活动类型相关联
  • 解决办法是:

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    </style>
    
    
    
    或者

  • 首先,您必须同步您的项目
  • 接下来,转到Build菜单,并在Clean项目上单击clic
  • 最后,再次转到“构建”菜单,并单击“重建”选项

  • 展示你的
    XML
    你能展示你的风格吗.XML@color/colorPrimary@color/colorprimarydrock@color/colorpeant到底是什么+3关于一个非常糟糕且完全不完整的问题?Dude请发布布局、图像、预期/实际状态等。
    视图未显示。
    。如果应用程序未显示布局..也许您应该发布布局。code..使用第二点可以正常工作,但当我运行具有相同问题的应用程序时,请再次发布。您的第一个答案非常好,谢谢@阿披实