導(dǎo)入包
- 直接把
.jar
文件放入app-libs
文件夾中安疗,點擊Sync Project with Gradle Files
-
build.gradle
中的依賴方法中加入導(dǎo)入包名,如下
編輯之后點擊dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'com.android.support:design:28.0.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso- core:3.0.2' }
sync now
- 右鍵
app
肛搬,選擇Open Module Setting
,選擇Dependencies
百姓,左下角+
導(dǎo)入所需要的包