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

   I have upgraded Cordova android 10 to 11 and get an error when I did 
"cordova build android". 
   
   ```
   > Task :app:processDebugResources FAILED
   
   FAILURE: Build failed with an exception.
   
   * What went wrong:
   Execution failed for task ':app:processDebugResources'.
   > A failure occurred while executing 
com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
      > Android resource linking failed
        
ERROR:/Users/gouteru/dev/vue/myapp/platforms/android/app/src/main/res/drawable/ic_cdv_splashscreen.xml:
 
          AAPT: error: <adaptive-icon> elements require a sdk version of at 
least 26.
   ```
   
   I have setup adaptive icon, legacy icon and notification icon with Image 
Asset Studio of Android Studio 2021.03 Dolphin Patch1.
   
   This error is gone when I changed minSdkVersion from 22 to 26 in config.xml. 
   But I don't want to change minSdkVersion because some of my app users using 
Android7.1 or older OS versions.
   Please teach me how to solve this error without changing minSdkVersion.
   
   Here's my config.xml regarding android.
   
   ```
       <platform name="android">
           <preference name="android-compileSdkVersion" value="32" />
           <preference name="AndroidXEnabled" value="true" />
           <preference name="GradlePluginKotlinEnabled" value="true" />
           <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" 
target="/manifest/application">
               <application android:icon="@mipmap/ic_launcher" 
android:roundIcon="@mipmap/ic_launcher_round" />
           </edit-config>
           <resource-file src="res/android/drawable/ic_launcher_background.xml" 
target="app/src/main/res/drawable/ic_launcher_background.xml" />
           <resource-file src="res/android/drawable/ic_launcher_foreground.xml" 
target="app/src/main/res/drawable/ic_launcher_foreground.xml" />
           <resource-file src="res/android/mipmap-anydpi-v26/ic_launcher.xml" 
target="app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" />
           <resource-file 
src="res/android/mipmap-anydpi-v26/ic_launcher_round.xml" 
target="app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" />
           <resource-file src="res/android/mipmap-hdpi/ic_launcher.png" 
target="app/src/main/res/mipmap-hdpi/ic_launcher.png" />
           <resource-file src="res/android/mipmap-hdpi/ic_launcher_round.png" 
target="app/src/main/res/mipmap-hdpi/ic_launcher_round.png" />
           <resource-file src="res/android/mipmap-mdpi/ic_launcher.png" 
target="app/src/main/res/mipmap-mdpi/ic_launcher.png" />
           <resource-file src="res/android/mipmap-mdpi/ic_launcher_round.png" 
target="app/src/main/res/mipmap-mdpi/ic_launcher_round.png" />
           <resource-file src="res/android/mipmap-xhdpi/ic_launcher.png" 
target="app/src/main/res/mipmap-xhdpi/ic_launcher.png" />
           <resource-file src="res/android/mipmap-xhdpi/ic_launcher_round.png" 
target="app/src/main/res/mipmap-xhdpi/ic_launcher_round.png" />
           <resource-file src="res/android/mipmap-xxhdpi/ic_launcher.png" 
target="app/src/main/res/mipmap-xxhdpi/ic_launcher.png" />
           <resource-file src="res/android/mipmap-xxhdpi/ic_launcher_round.png" 
target="app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png" />
           <resource-file src="res/android/mipmap-xxxhdpi/ic_launcher.png" 
target="app/src/main/res/mipmap-xxxhdpi/ic_launcher.png" />
           <resource-file 
src="res/android/mipmap-xxxhdpi/ic_launcher_round.png" 
target="app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png" />
           <!-- <icon density="ldpi" 
src="res/icon/android/mipmap-ldpi/ic_launcher.png" />
           <icon density="mdpi" 
src="res/icon/android/mipmap-mdpi/ic_launcher.png" />
           <icon density="hdpi" 
src="res/icon/android/mipmap-hdpi/ic_launcher.png" />
           <icon density="xhdpi" 
src="res/icon/android/mipmap-xhdpi/ic_launcher.png" />
           <icon density="xxhdpi" 
src="res/icon/android/mipmap-xxhdpi/ic_launcher.png" />
           <icon density="xxxhdpi" 
src="res/icon/android/mipmap-xxxhdpi/ic_launcher.png" /> -->
           <!-- <splash density="land-hdpi" 
src="res/screen/android/splash-land-hdpi.png" />
           <splash density="land-ldpi" 
src="res/screen/android/splash-land-ldpi.png" />
           <splash density="land-mdpi" 
src="res/screen/android/splash-land-mdpi.png" />
           <splash density="land-xhdpi" 
src="res/screen/android/splash-land-xhdpi.png" />
           <splash density="land-xxhdpi" 
src="res/screen/android/splash-land-xxhdpi.png" />
           <splash density="port-hdpi" 
src="res/screen/android/splash-port-hdpi.png" />
           <splash density="port-ldpi" 
src="res/screen/android/splash-port-ldpi.png" />
           <splash density="port-mdpi" 
src="res/screen/android/splash-port-mdpi.png" />
           <splash density="port-xhdpi" 
src="res/screen/android/splash-port-xhdpi.png" />
           <splash density="port-xxhdpi" 
src="res/screen/android/splash-port-xxhdpi.png" /> -->
           <preference name="AndroidWindowSplashScreenAnimatedIcon" 
value="res/android/mipmap-anydpi-v26/ic_launcher_round.xml" />
           <preference name="android-minSdkVersion" value="22" />
           <preference name="android-targetSdkVersion" value="32" />
           <allow-intent href="market:*" />
           <preference name="AndroidLaunchMode" value="singleTask" />
           <preference name="AndroidInsecureFileModeEnabled" value="true" />
           <preference name="AndroidPersistentFileLocation" 
value="Compatibility" />
           <preference name="AutoHideSplashScreen" value="true" />
           <!-- <preference name="SplashScreenDelay" value="0" /> -->
           <preference name="SplashScreenDelay" value="3000" />
           <feature name="Calendar">
               <param name="android-package" 
value="nl.xservices.plugins.Calendar" />
           </feature>
           <!-- <preference name="GradlePluginGoogleServicesEnabled" 
value="true" />
           <preference name="GradlePluginGoogleServicesVersion" value="4.2.0" 
/> -->
       </platform>
   ```
   
   
   
   
   


-- 
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