Re: [camerax-developers] Latest beta (02), sets target to sdk 34, which is still in developing?

187 views
Skip to first unread message

Scott Nien

unread,
Aug 10, 2023, 5:06:04 AM8/10/23
to Ultima Ratio, Android CameraX Discussion Group
Hi Joerg, 

As mentioned above, this is a Jetpack policy and it's not something CameraX can change.  
The reason for requiring the latest compileSDK version is to enable new Android features using the latest API.  

If you can give us more specific details regarding the difficulties you have while upgrading the compileSdk version,  I can help forward that to the Jetpack team to get the answer if you need. 
Scott

On Wed, Aug 9, 2023 at 4:20 PM Ultima Ratio <beh...@gmail.com> wrote:
So, it should work..

But even compileSdk needs quite alot of changes, as for whatever reasons many things are non-null or nullable now (alot of changes in canvas related things).

Also as we have part of the app in react-native, its a nightmare.. I cannot force all these libs, to support compileSdk 34 (their minimum is 31).

What is the reason for enforcing the compileSdkVersion to 34, except making the lifes of devs harder without any benefits?

Joerg

scot...@google.com schrieb am Dienstag, 8. August 2023 um 06:38:34 UTC+2:
Hi there, 

This compileSdk 34 requirement is enforced for every latest Jetpack library. 
see https://androiddev.social/@ianlake/110584961805285284

But do note that compileSdk is different from targetSdk.  Changing compileSdk won't cause any behavior change in apps. 

Scott

On Mon, Aug 7, 2023 at 10:46 PM Ultima Ratio <beh...@gmail.com> wrote:
You really sure, you wanted to release 1.3.0-beta02 like that?

 Dependency 'androidx.camera:camera-extensions:1.3.0-beta02' requires libraries and applications that
      depend on it to compile against version 34 or later of the
      Android APIs.

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/6429a839-f94b-4706-b7c1-90d6ce1726cen%40android.com.

Ultima Ratio

unread,
Aug 22, 2023, 8:44:40 AM8/22/23
to Android CameraX Discussion Group, scot...@google.com, Android CameraX Discussion Group, Ultima Ratio
Hi!

The problem is basically all canvas related things. Many things which are nullable are not-nullable anymore (or other way) and this will lead to issues with Kotlin.

I had internal the same thing with a selfmade component, basically onDraw(canvas) was before sdk 34 NULLABLE and now its not.

So this will result in being uncompile-able:
override fun onDraw(canvas: Canvas?) { .... }

As there is no null-able function anymore, its null-safe now. So I dont override anything.

No issues with fixes in my code, just write it like that: "override fun onDraw(canvas: Canvas) { )" and its fixed.

I cannot change this in other libraries quite fast.. Thats why I dont think its a great idea, to point to compileSdk34 as soon as its coming out, as what is the actual advantage for it? I have no issues with it, if its done 3-6 months after the android release.

And as we have parts in React-native, this is the library with the error: https://github.com/software-mansion/react-native-screens


BR, Joerg

Reply all
Reply to author
Forward
0 new messages