工程配置

导入包

  • 直接把.jar文件放入app-libs文件夹中,点击Sync Project with Gradle Files
  • build.gradle中的依赖方法中加入导入包名,如下
    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,左下角+导入所需要的包

你可能感兴趣的:(工程配置)