【发布时间】:2022-11-07 19:35:35
【问题描述】:
我阅读了官方文档,但无法运行。 https://developer.android.com/topic/performance/baselineprofiles#measuring-baseline
我的基线配置文件已设置,并且我在主文件夹中有我的 baseline-prof.txt 文件。
现在不知道如何在我的设备上测试它。
文档说:
Next, let's sideload the Baseline Profile.
Note: This workflow is only supported on version Android 9 (API 28) to Android 11 (API 30).
# Unzip the Release APK first
unzip release.apk
# Create a ZIP archive
# Note: The name should match the name of the APK
# Note: Copy baseline.prof{m} and rename it to primary.prof{m}
cp assets/dexopt/baseline.prof primary.prof
cp assets/dexopt/baseline.profm primary.profm
# Create an archive
zip -r release.dm primary.prof primary.profm
# Confirm that release.dm only contains the two profile files:
unzip -l release.dm
# Archive: release.dm
# Length Date Time Name
# --------- ---------- ----- ----
# 3885 1980-12-31 17:01 primary.prof
# 1024 1980-12-31 17:01 primary.profm
# --------- -------
# 2 files
# Install APK + Profile together
adb install-multiple release.apk release.dm
但是当我开始在终端中输入这些评论时,它会立即告诉我:
unzip: cannot find or open release.apk, release.apk.zip or release.apk.ZIP.
我不知道该怎么做,也找不到任何其他来源来解释它
编辑文档状态:“注意:此工作流程仅在 Android 9 (API 28) 到 Android 11 (API 30) 版本上受支持。” 所以我不能在我的 Android 12 设备上旁加载基线配置文件?
【问题讨论】:
标签: android kotlin baseline-profile