Skip to content
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

Update Android/WPF Demo and Portrait Processing to SDK 1.0.0 Beta.2 #30

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

der3318
Copy link
Member

@der3318 der3318 commented Nov 4, 2024

Recently we released a newer package of Azure SDK for face service:

Language SDK Pull Request Version Change
C# Azure.AI.Vision.Face Azure/azure-sdk-for-net#45402 1.0.0-beta.1 ➡️ 1.0.0-beta.2
Python azure.ai.vision.face Azure/azure-sdk-for-python#37044 1.0.0b1 ➡️ 1.0.0b2
Java com.azure:azure-ai-vision-face Azure/azure-sdk-for-java#41823
Azure/azure-sdk-for-java#42239
1.0.0-beta.1 ➡️ 1.0.0-beta.2

Bump the lib versions and address the breaking changes (e.g., enum rename) for AndroidDetect, DemoWPF, and PortraitProcessing samples.

@@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.0'
classpath 'com.android.tools.build:gradle:8.3.2'
Copy link
Member Author

@der3318 der3318 Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using AGP 8.0.0 results in the following error:

Execution failed for task ':app:mergeExtDexDebug'.
java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null

With the build environment:

  • Android Studio | Ladybug (2024.2.1) | September 2024
  • JDK 21, which is the new default JetBrains Runtime (JBR) that comes with Android Studio 2024.2.1 (see blog)
  • Gradle 8.5, the minimum version that supports Java 21 (see compatibility matrix)

Upgrading AGP from 8.0.0 to 8.3.2, which is the maximum version compatible with Gradle 8.5 (see compatibility table and 8.3.* release notes), solves the problem.

Accordingly, the API level is suggested to migrate from 33 to 34:

The maximum API level that Android Gradle plugin 8.3 supports is API level 34.

android {
    namespace 'com.contoso.facetutorial'
-   compileSdk 33
+   compileSdk 34
    defaultConfig {
        minSdkVersion 28
-       targetSdkVersion 33
+       targetSdkVersion 34
        versionCode 1
        versionName "1.4.3"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

@der3318 der3318 merged commit c9fa209 into main Nov 12, 2024
1 check passed
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