1.直接在build.grade中的dependencies下添加
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
例如:
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation fileTree(dir: 'libs', include: ['*.jar']) testImplementation 'junit:junit:4.12' testImplementation "org.json:json:20140107" testImplementation 'org.robolectric:robolectric:4.2.1' testImplementation "org.powermock:powermock-module-junit4:1.6.6" testImplementation "org.powermock:powermock-module-junit4-rule:1.6.6" testImplementation "org.powermock:powermock-api-mockito:1.6.6" testImplementation "org.powermock:powermock-classloading-xstream:1.6.6" }
2.a. build.grade下添加
<