[英]Where is the test apk located in Android Project?
對於運行測試,Android Studio/Gradle 生成一個測試 apk,它對應用程序 apk 執行測試。 任何人都可以分享生成測試 apk 的位置以及項目中的位置嗎?
以下是我的 app/build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.ark.beacons_test"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
}
}
dependencies {
compile fileTree(include: ['*.jar,*.aar'], dir: 'libs')
compile(name: 'android-lib', ext: 'aar')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
}
不要混淆 app apk 和 test apk。 在我的例子中,app apk 被稱為 app-debug.apk 並且位於\\app\\build\\outputs\\apk\\debug
和測試 apk 被稱為 app-debug-androidTest.apk 並且位於\\app\\build\\outputs\\apk\\androidTest\\debug
。 您可以在 Firebase 測試實驗室中同時加載它們。
/YourProject/app/build/outputs/apk
對於 Kotlin 項目,它可能位於: <yourproject>/app/build/intermediates/apk/androidTest/debug
Xamarin.Android - ProjectRootDirectory/bin/debug/PackageName.apk
Android - /AppRootFolder/app/build/outputs/apk/YourApksHere
C:\\Users\\Admin\\AndroidStudioProjects\\MyApplication\\app\\build\\outputs\\apk
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.