aaarichter opened a new issue, #1603:
URL: https://github.com/apache/cordova-android/issues/1603

   # Bug Report
   
   ## Problem
   
   when installing the android platform with `cordova platform add android@11` 
then the `platforms/android/cdv-gradle-config.json` sets the SDK version to 28
   ```json
   {
     "MIN_SDK_VERSION": 22,
     "SDK_VERSION": 28,
     "COMPILE_SDK_VERSION": null,
     "GRADLE_VERSION": "7.4.2",
     "MIN_BUILD_TOOLS_VERSION": "32.0.0",
     "AGP_VERSION": "7.2.1",
     "KOTLIN_VERSION": "1.5.21",
     "ANDROIDX_APP_COMPAT_VERSION": "1.4.2",
     "ANDROIDX_WEBKIT_VERSION": "1.4.0",
     "ANDROIDX_CORE_SPLASHSCREEN_VERSION": "1.0.0-rc01",
     "GRADLE_PLUGIN_GOOGLE_SERVICES_VERSION": "4.3.10",
     "IS_GRADLE_PLUGIN_GOOGLE_SERVICES_ENABLED": false,
     "IS_GRADLE_PLUGIN_KOTLIN_ENABLED": false
   }
   ```
   
   ### What is expected to happen?
   that the `SDK_VERSION` version is set to the latest, at least matching the 
`MIN_BUILD_TOOLS_VERSION`
   
   
   ### What does actually happen?
   
   Inside of CI/CD, gradle checks fail:
   
   ```console
   > Task :CordovaLib:extractReleaseAnnotations
   FAILURE: Build failed with an exception.
   * What went wrong:
   Execution failed for task ':app:checkReleaseAarMetadata'.
   > A failure occurred while executing 
com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > 8 issues were found when checking AAR metadata:
        
          1.  Dependency 'androidx.appcompat:appcompat:1.4.2' requires 
libraries and applications that
              depend on it to compile against version 31 or later of the
              Android APIs.
        
              :app is currently compiled against android-28.
        
              Recommended action: Update this project to use a newer 
compileSdkVersion
              of at least 31, for example 32.
        
              Note that updating a library or application's compileSdkVersion 
(which
              allows newer APIs to be used) can be done separately from updating
              targetSdkVersion (which opts the app in to new runtime behavior) 
and
              minSdkVersion (which determines which devices the app can be 
installed
              on).
        
          2.  Dependency 'androidx.core:core-splashscreen:1.0.0-rc01' requires 
libraries and applications that
              depend on it to compile against version 31 or later of the
              Android APIs.
        
              :app is currently compiled against android-28.
        
              Recommended action: Update this project to use a newer 
compileSdkVersion
              of at least 31, for example 32.
        
              Note that updating a library or application's compileSdkVersion 
(which
              allows newer APIs to be used) can be done separately from updating
              targetSdkVersion (which opts the app in to new runtime behavior) 
and
              minSdkVersion (which determines which devices the app can be 
installed
              on).
        
          3.  Dependency 'androidx.appcompat:appcompat-resources:1.4.2' 
requires libraries and applications that
              depend on it to compile against version 31 or later of the
              Android APIs.
        
              :app is currently compiled against android-28.
        
              Recommended action: Update this project to use a newer 
compileSdkVersion
              of at least 31, for example 32.
        
              Note that updating a library or application's compileSdkVersion 
(which
              allows newer APIs to be used) can be done separately from updating
              targetSdkVersion (which opts the app in to new runtime behavior) 
and
              minSdkVersion (which determines which devices the app can be 
installed
              on).
        
          4.  Dependency 'androidx.emoji2:emoji2-views-helper:1.0.0' requires 
libraries and applications that
              depend on it to compile against version 31 or later of the
              Android APIs.
        
              :app is currently compiled against android-28.
        
              Recommended action: Update this project to use a newer 
compileSdkVersion
              of at least 31, for example 32.
        
              Note that updating a library or application's compileSdkVersion 
(which
              allows newer APIs to be used) can be done separately from updating
              targetSdkVersion (which opts the app in to new runtime behavior) 
and
              minSdkVersion (which determines which devices the app can be 
installed
              on).
        
          5.  Dependency 'androidx.emoji2:emoji2:1.0.0' requires libraries and 
applications that
              depend on it to compile against version 31 or later of the
              Android APIs.
        
              :app is currently compiled against android-28.
        
              Recommended action: Update this project to use a newer 
compileSdkVersion
              of at least 31, for example 32.
        
              Note that updating a library or application's compileSdkVersion 
(which
              allows newer APIs to be used) can be done separately from updating
              targetSdkVersion (which opts the app in to new runtime behavior) 
and
              minSdkVersion (which determines which devices the app can be 
installed
              on).
        
          6.  Dependency 'androidx.core:core:1.7.0' requires libraries and 
applications that
              depend on it to compile against version 31 or later of the
              Android APIs.
        
              :app is currently compiled against android-28.
        
              Recommended action: Update this project to use a newer 
compileSdkVersion
              of at least 31, for example 32.
        
              Note that updating a library or application's compileSdkVersion 
(which
              allows newer APIs to be used) can be done separately from updating
              targetSdkVersion (which opts the app in to new runtime behavior) 
and
              minSdkVersion (which determines which devices the app can be 
installed
              on).
        
          7.  Dependency 'androidx.lifecycle:lifecycle-process:2.4.0' requires 
libraries and applications that
              depend on it to compile against version 31 or later of the
              Android APIs.
        
              :app is currently compiled against android-28.
        
              Recommended action: Update this project to use a newer 
compileSdkVersion
              of at least 31, for example 32.
        
              Note that updating a library or application's compileSdkVersion 
(which
              allows newer APIs to be used) can be done separately from updating
              targetSdkVersion (which opts the app in to new runtime behavior) 
and
              minSdkVersion (which determines which devices the app can be 
installed
              on).
        
          8.  Dependency 'androidx.lifecycle:lifecycle-runtime:2.4.0' requires 
libraries and applications that
              depend on it to compile against version 31 or later of the
              Android APIs.
        
              :app is currently compiled against android-28.
        
              Recommended action: Update this project to use a newer 
compileSdkVersion
              of at least 31, for example 32.
        
              Note that updating a library or application's compileSdkVersion 
(which
              allows newer APIs to be used) can be done separately from updating
              targetSdkVersion (which opts the app in to new runtime behavior) 
and
              minSdkVersion (which determines which devices the app can be 
installed
              on).
   
   ```
   
   
   ## Information
   
   
   
   
   ### Command or Code
   in docker
   
   ```bash
   npm install
   cordova prepare android
   cordova build android --release -- 
--keystore=./myRAzept_release_keystore.jks 
--storePassword="$APK_RELEASE_KEY_STORE_PASSWORD" --alias=myrazept 
--password="$APK_RELEASE_KEY_ALIAS_PASSWORD" --packageType=apk
   ```
   
   
   ### Environment, Platform, Device
   running in Gitlab CI
   
   using `beevelop/cordova` docker image: 
   ```docker
   FROM beevelop/cordova
   
   ENV ANDROID_HOME=$ANDROID_SDK_ROOT \
       CORDOVA_BUILD_TOOLS_VERSION=32.0.0
   
   ENV PATH 
$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/platform-tools:$ANDROID_SDK_ROOT/build-tools/$ANDROID_BUILD_TOOLS_VERSION:$ANT_HOME/bin:$MAVEN_HOME/bin:$GRADLE_HOME/bin
   
   RUN while true; do echo 'y'; sleep 2; done | sdkmanager 
"build-tools;${CORDOVA_BUILD_TOOLS_VERSION}"
   ```
   
   ### Version information
   ```json5
     "cordova": "^11.1.0"
     "cordova-android": "^11.0.0",
     "cordova-ios": "^6.3.0",
     "cordova-plugin-headercolor": "^1.0.0",
     "cordova-plugin-splashscreen": "^6.0.2",
     "cordova-plugin-statusbar": "^3.0.0"
   ```
   
   ## Checklist
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to