引入layoutlib.jar

在android studio中引入layoutlib.jar

def getLayoutLibPath() {
return “${android.getSdkDirectory().getAbsolutePath()}” + “/platforms/” + android.compileSdkVersion + “/data/layoutlib.jar”
}

android {
….
}

dependencies {
compile fileTree(dir: ‘libs’, include: ‘*.jar’)
provided files(getLayoutLibPath())
}

你可能感兴趣的:(android)