相关疑难解决方法(0)

未知属性android:layout_width,layout_height,id,gravity,layout_gravity,padding

  • 在所有Android标记上获取未知属性错误.

  • 在布局XML中,自动建议不显示所有属性(如layout_width,layout_height,orientation,orientation和所有其他android属性.)

这是一个快照

在此输入图像描述

在此输入图像描述 我为解决这个问题所做的一切.

  • 清洁构建和重建
  • 删除.idea文件
  • 无效的缓存/重新启动..选项
  • 打开省电模式.

SDk是最新的.

在App Level Gridle中

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.example.abhishek.ondemandservice"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),     'proguard-rules.pro'
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

应用水平Gride.

buildscript {
    repositories {
        maven { url "http://dl.bintray.com/populov/maven" }
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle …
Run Code Online (Sandbox Code Playgroud)

android android-layout android-xml android-studio android-layoutparams

70
推荐指数
7
解决办法
2万
查看次数