Android SDK license not accepted eventhough using command

Error:

  • What went wrong:
    Could not determine the dependencies of task ‘:app:lintReportDebug’.

Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;33.0.1 Android SDK Build-Tools 33.0.1
platforms;android-34 Android SDK Platform 34
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
All licenses can be accepted using the sdkmanager command line tool:
sdkmanager.bat --licenses
Or, to transfer the license agreements from one workstation to another, see #download-with-gradle

Using Android SDK: /home/circleci/code…

Here is my config.yml

version: 2.1
orbs:
android: circleci/android@2.3.0
jobs:
build:
working_directory: ~/code
docker:
- image: cimg/android:2023.12
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- android/accept-licenses
- restore_cache:
key: jars-{{ checksum “build.gradle.kts” }}-{{ checksum “app/build.gradle.kts” }}
- run:
name: create local.properties
command: |
echo sdk.dir= ~/code > local.properties
echo gpr.usr=*** >> local.properties
echo gpr.key= *** >> local.properties
- run:
name: chmod permissions
command: chmod +x ./gradlew
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum “build.gradle.kts” }}-{{ checksum “app/build.gradle.kts” }}
- run:
name: Run Tests
command: ./gradlew lint test
- store_artifacts:
path: app/build/reports
destination: reports
- store_test_results:
path: app/build/test-results