-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release/7.0 Android Mono runs are failing #3527
Comments
Searching for the [INSTALL_FAILED_VERIFICATION_FAILURE] failure, I found this https://stackoverflow.com/questions/15014519/apk-installation-failed-install-failed-verification-failure. Testing locally, it appears that the version the apps are targetting is old enough that the phones are popping up an error. |
|
The exact message in the pop-up was:
I included the link to the learn more inline. My understanding is that this is likely related to the target Android OS version specified by the app, with the default one for the release/7.0 android app being old enough to cause an error (https://developer.android.com/about/versions/10/behavior-changes-all#low-target-sdk-warnings). If this version can be updated for the sample apps in release/7.0, we should stop hitting this problem, but I am not familiar with how this would be done. |
The app (https://github.com/dotnet/runtime/tree/release/7.0/src/mono/sample/Android) was configured to be built for API level 33. When testing locally, I hit this error when trying to install the app on a device with API level 34. I need to figure out how to change the target API level when building this app. |
Probably needs to pass |
That makes sense, do you know correct path for passing the TargetApiLevel to the ApkBuilder? Although, looking at the ApkBuilder for release/7.0, it does not appear to have the option for TargetApiLevel: https://github.com/dotnet/runtime/blob/release/7.0/src/tasks/AndroidAppBuilder/ApkBuilder.cs#L15-L16 compared to main: https://github.com/dotnet/runtime/blob/main/src/tasks/AndroidAppBuilder/ApkBuilder.cs#L17, so whoever manages the ApkBuilder probably has to backport or add the TargetApiLevel change. |
dotnet/runtime#95770 this should fix the problem. When it gets approved and released, the perf lab should switch to use the corresponding .NET7 servicing package. Then the app will be able to install successfully. |
dotnet/runtime#95770 has been merged. Does the perf lab run .NET7 Android sample from |
Yes, we run and build directly from the respective release branches. In this case, we also seem to test some of the staging branch changes with this change being tested in: https://dev.azure.com/dnceng/internal/_build/results?buildId=2333516&view=results. Although the results should not show up in the reports as we only take release/*.0 and main for the reports. |
Make sense. Will you be able to test the change from staging branch on perf lab device to make sure the issue is gone? Then, we probably could close this issue. |
Looks like the app build failed because the BuildApiLevel (29) was less than the TargetApiLevel (31). https://dev.azure.com/dnceng/internal/_build/results?buildId=2333516&view=results
I am not sure what/where would need to change to fix the exception. If you get a PR or branch with a change you want to test, let me know and I can run just the test for the Android app rather than having to make a PR, merge, and then wait for a test. |
This is because the Android SDK version installed on your computer is API level 29. You need to follow the script in this doc to install newer Android SDK. |
Do you happen to know who has done this for the runtime repo in the past? This failure is from within the azure pipelines so it is using a container. I thought I had saw a commit mentioning updating it but haven't been able to find it again. |
It looks like this is the commit I was thinking of: dotnet/runtime@921029b, though that was a decent time ago. I also found that it looks like the latest images were set to be used on main in 2022: https://github.com/dotnet/runtime/pull/76630/files, maybe doing something similar would work. |
Let me know if that works. Note that .NET8 has the latest change. Use the same version of the container as being used to build the Android app for .NET8 would probably fix this issue. |
Fixed by: dotnet/runtime@d776e5e |
Since 11/7,
Last good run: https://dev.azure.com/dnceng/internal/_build/results?buildId=2309910&view=results
First bad run: https://dev.azure.com/dnceng/internal/_build/results?buildId=2312318&view=logs&j=b3f9a873-839e-5600-b5cf-2f11099e60eb&t=a7e6f6ea-04c0-5565-1682-5f6c6d2084e5
The text was updated successfully, but these errors were encountered: