1、Android studio Gradle 加載依賴太慢妄痪?
解決辦法如下:
buildscript {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
}
將Gradle 的資源加載服務(wù)器換成阿里巴巴的库北,這是國內(nèi)自己搭建的服務(wù)器沦泌,gradle 加載相對快一點。
- 使用Shape 畫圓角矩形
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<solid
android:color="#ffffff" />
<stroke
android:width="1dp"
android:color="@color/rgb53_99" />
<corners
android:topLeftRadius="5dip"
android:topRightRadius="5dip"
android:bottomLeftRadius="5dip"
android:bottomRightRadius="5dip" />
</shape>
- 關(guān)于Android studio 中引入moundle 無法使用依賴召耘。
在module中導(dǎo)入了***.jar或者在線的包鹤盒,在app中如果想引用這個jar里相關(guān)的內(nèi)容時蚕脏,發(fā)現(xiàn)根本引用不到侦副,會提示你add library/*****.jar 一大串,你回車一下或者點一下沒反應(yīng)蝗锥,根本沒有用跃洛。
只需把module下gradle里相關(guān)jar的implementation改為api即可,因為implementation 修飾的只能在當(dāng)前module中引用终议,你在app下是引用不了的,你改完重新編譯下即可進行引用了葱蝗。