You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/08/04 17:24:50 UTC

[GitHub] [cordova-android] goffioul commented on issue #1310: Unable to set targetSdk != compileSdk, fail to compile with targetSdk < 30

goffioul commented on issue #1310:
URL: https://github.com/apache/cordova-android/issues/1310#issuecomment-892836737


   First, I tried with `android-targetSdkVersion == 23`, which was my original config. This fails to compile with
   ```
   platforms/android/CordovaLib/src/org/apache/cordova/PluginManager.java:336: error: cannot find symbol
               if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
                                                               ^
   ```
   
   Then I tried with `android-targetSdkVersion == 25`, which is the lowest API level of the devices targetted by my app (these devices are not Google-enabled). This fails again to compile with
   ```
   > A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
      > Android resource linking failed
        ERROR:.../.gradle/caches/transforms-3/88a490903787e53e545ff1ce21c3b715/transformed/appcompat-1.3.0/res/values-v26/values-v26.xml:5:5-8:13: AAPT: error: resource android:attr/colorError not found.
            
        ERROR:.../.gradle/caches/transforms-3/88a490903787e53e545ff1ce21c3b715/transformed/appcompat-1.3.0/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
            
        ERROR:.../.gradle/caches/transforms-3/88a490903787e53e545ff1ce21c3b715/transformed/appcompat-1.3.0/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
            
        ERROR:.../.gradle/caches/transforms-3/88a490903787e53e545ff1ce21c3b715/transformed/appcompat-1.3.0/res/values-v28/values-v28.xml:5:5-8:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
            
        ERROR:.../.gradle/caches/transforms-3/88a490903787e53e545ff1ce21c3b715/transformed/appcompat-1.3.0/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
   ```
   
   AFAIK, the dependency on appcompat is coming from cordova itself. There are other similar errors coming from a dependency on `androidx.core:core:1.3.2` that is injected by one of my custom plugins.
   
   For the record, using `android-targetSdkVersion == 28` works fine (compilation-wise).


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org