You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/01/31 08:57:48 UTC

[GitHub] davidschreiber edited a comment on issue #418: Migrate to AndroidX

davidschreiber edited a comment on issue #418: Migrate to AndroidX
URL: https://github.com/apache/cordova-plugin-camera/pull/418#issuecomment-459266227
 
 
   Here's an excerpt of the build errors on Travis:
   
   ```
   :app:processDebugResources/home/travis/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/b9b8c67c94d012f8e982861787cf3aec/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.
       
   /home/travis/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/b9b8c67c94d012f8e982861787cf3aec/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.
       
   /tmp/tmp-38189QsOugRLFnQO/platforms/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:87: error: resource android:attr/fontVariationSettings not found.
   /tmp/tmp-38189QsOugRLFnQO/platforms/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:87: error: resource android:attr/ttcIndex not found.
   error: failed linking references.
   ```
   
   The missing attributes `android:attr/fontVariationSettings` and `android:attr/ttcIndex` are used within the AndroidX library, and are part of the Android framework since API 28: https://developer.android.com/sdk/api_diff/28/changes/android.R.attr
   
   This means that AndroidX does actually require `compileSdkVersion 28` to build. This is also mentioned in the AndroidX docs (https://developer.android.com/jetpack/androidx/#using_androidx):
   > If you want to use AndroidX in a new project, you need to set the compile SDK to Android 9.0 (API level 28) or higher and set both of the following Android Gradle plugin flags to true in your gradle.properties file.
   
   I don't know my way around how Cordova builds and tests using Travis, so my first attempt was to simply add another target environment with API 28. This failed, since it seems that `cordova-paramedic` does not yet contain a configuration for that API level. I went ahead and forked `cordova-paramedic` and prepared an experimental branch where I added an Android 9.0 configuration: https://github.com/davidschreiber/cordova-paramedic/tree/davidschreiber/android-9
   
   Let's see if Travis likes that. If I'm doing anything completely wrong, please let me know. Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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