Skip to content

Set target SDK for the microbenchmark test APK - #374

Open
noisegain wants to merge 1 commit into
android:mainfrom
noisegain:fix-target-sdk
Open

noisegain wants to merge 1 commit into
android:mainfrom
noisegain:fix-target-sdk

Conversation

@noisegain

Copy link
Copy Markdown

The microbenchmark module only sets minSdk, so its test APK is built with targetSdkVersion 21.
On a Galaxy S24+ running Android 17 (where ro.build.version.min_supported_target_sdk is 28) the benchmarks fail with:

java.lang.AssertionError: ERRORS (not suppressed): ACTIVITY-MISSING

The device also shows a warning that the app was built for an older version of Android.

This PR sets testOptions.targetSdk to the module's compileSdk (35).
With that change the benchmarks start and finish on the same device.

Tested with AutoBoxingBenchmark, together with #373 (main does not compile without it).

The microbenchmark module only sets minSdk, so the test APK is built with
targetSdkVersion 21. On devices whose minimum supported target SDK is higher
(28 on a Galaxy S24+ running Android 17) every benchmark fails with
'ERRORS (not suppressed): ACTIVITY-MISSING'. Set testOptions.targetSdk to the
module's compileSdk.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant