在最布局中,已定義:
xmlns:app="http://schemas.android.com/apk/res-auto"(自動識別)
在控件打app就是出不來屬性
gradle裡面的dependencies中已經依賴過:compile 'com.zhy:percent-support-extends:1.0.1'這是我需要的控件
Rebuild和CloseProject都已經試過,沒用!! 在線求解答
將aar包賦值到libs目錄下
//這句很重要,親身試驗
repositories { flatDir { dirs 'libs' } }
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
//這樣引用
compile(name: 'mylibrary-debug', ext: 'aar')
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:support-v4:22.2.0'
compile project(':percent-support-extends')
}