Cordova build issue relating to fontVariationSettings
up vote
0
down vote
favorite
I am having a build issue with a Cordova project that I have inherited specifically the error raised is: -
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:processDebugResourcesC:Usersandy.gradlecachestransforms-1files-1.1support-compat-28.0.0.aar96270291fb4c7e49ddab8d4d1a4f36f7resvaluesvalues.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.
I have another project which builds successfully and the difference between the two projects appears to be the platformsandroidproject.settings
file, if I manually change the setting my project builds. However as this file appears to be re-created every time I run cordova prepare android
this is not an ideal situation, the setting in question is: -
cordova.system.library.1=com.android.support:support-v4:+
if I change this to: -
cordova.system.library.1=com.android.support:support-v4:24.1.1+
my build is successful!
So my question is what impacts this setting, as I feel I need to understand the reasoning behind the differing value as other than the working project having more dependencies the non-working project contains the same references but has one additional dependency this being: -
cordova-plugin-file-opener2
I do not have SDK version 28 installed, I can see the logic behind the error and I would assume installing version 28 may resolve the issue but I would like to understand why one project creates the settings with one version number and the second project is created with a differing one?
android cordova
New contributor
add a comment |
up vote
0
down vote
favorite
I am having a build issue with a Cordova project that I have inherited specifically the error raised is: -
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:processDebugResourcesC:Usersandy.gradlecachestransforms-1files-1.1support-compat-28.0.0.aar96270291fb4c7e49ddab8d4d1a4f36f7resvaluesvalues.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.
I have another project which builds successfully and the difference between the two projects appears to be the platformsandroidproject.settings
file, if I manually change the setting my project builds. However as this file appears to be re-created every time I run cordova prepare android
this is not an ideal situation, the setting in question is: -
cordova.system.library.1=com.android.support:support-v4:+
if I change this to: -
cordova.system.library.1=com.android.support:support-v4:24.1.1+
my build is successful!
So my question is what impacts this setting, as I feel I need to understand the reasoning behind the differing value as other than the working project having more dependencies the non-working project contains the same references but has one additional dependency this being: -
cordova-plugin-file-opener2
I do not have SDK version 28 installed, I can see the logic behind the error and I would assume installing version 28 may resolve the issue but I would like to understand why one project creates the settings with one version number and the second project is created with a differing one?
android cordova
New contributor
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am having a build issue with a Cordova project that I have inherited specifically the error raised is: -
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:processDebugResourcesC:Usersandy.gradlecachestransforms-1files-1.1support-compat-28.0.0.aar96270291fb4c7e49ddab8d4d1a4f36f7resvaluesvalues.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.
I have another project which builds successfully and the difference between the two projects appears to be the platformsandroidproject.settings
file, if I manually change the setting my project builds. However as this file appears to be re-created every time I run cordova prepare android
this is not an ideal situation, the setting in question is: -
cordova.system.library.1=com.android.support:support-v4:+
if I change this to: -
cordova.system.library.1=com.android.support:support-v4:24.1.1+
my build is successful!
So my question is what impacts this setting, as I feel I need to understand the reasoning behind the differing value as other than the working project having more dependencies the non-working project contains the same references but has one additional dependency this being: -
cordova-plugin-file-opener2
I do not have SDK version 28 installed, I can see the logic behind the error and I would assume installing version 28 may resolve the issue but I would like to understand why one project creates the settings with one version number and the second project is created with a differing one?
android cordova
New contributor
I am having a build issue with a Cordova project that I have inherited specifically the error raised is: -
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:processDebugResourcesC:Usersandy.gradlecachestransforms-1files-1.1support-compat-28.0.0.aar96270291fb4c7e49ddab8d4d1a4f36f7resvaluesvalues.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.
I have another project which builds successfully and the difference between the two projects appears to be the platformsandroidproject.settings
file, if I manually change the setting my project builds. However as this file appears to be re-created every time I run cordova prepare android
this is not an ideal situation, the setting in question is: -
cordova.system.library.1=com.android.support:support-v4:+
if I change this to: -
cordova.system.library.1=com.android.support:support-v4:24.1.1+
my build is successful!
So my question is what impacts this setting, as I feel I need to understand the reasoning behind the differing value as other than the working project having more dependencies the non-working project contains the same references but has one additional dependency this being: -
cordova-plugin-file-opener2
I do not have SDK version 28 installed, I can see the logic behind the error and I would assume installing version 28 may resolve the issue but I would like to understand why one project creates the settings with one version number and the second project is created with a differing one?
android cordova
android cordova
New contributor
New contributor
edited Nov 15 at 16:10
DaFois
1,71231418
1,71231418
New contributor
asked Nov 15 at 15:02
Andrew Holloway-Breward
31
31
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
In Cordova projects, the versions of native libraries pulled into the Android build via Gradle are controlled directly by the Cordova plugins you have installed in your project.
The Gradle config is dynamically generated by Cordova, so each time you run cordova prepare android
, the build.gradle
file is regenerated.
In this case, the library dependency is the Android Support Library (com.android.support
).
cordova-plugin-file-opener2
specifies version +
which will pull in the very latest version, which is currently v28.0.0 as can be seen on the releases page.
However, if another plugin in your project specifies a different version, this will lead to problems and often build failures due to version conflicts.
In a native Android project, the build.gradle
file is under your direct control, so you'd never have these problems.
One solution is to install the cordova-android-support-gradle-release plugin into your project.
This plugin overrides the versions of the Android Support Library specified by other plugins, enabling you to align the versions and so fix the build problems.
For example, in your case you can run:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=24.1.1
This will install the plugin and override the versions specified by other plugins to ensure v24.1.1 of the Support Library is included in your project.
One consideration is that v24 is quite old, so you may want to try a newer version, e.g.:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27.+
Hi Dave, appreciate your reply thank you, the project already contained that plug in cordova-android-support-gradle-release and was set to 27.+ as you suggested hence my confusion at the build error. However, now with a fresh mind and your helpful explanation I simply updated my Android SDK to the latest version, updated my cordova from 8.0.0 to 8.1.2 and then removed the gradel-release plugin and added it back in again and hey presto the app now builds again!
– Andrew Holloway-Breward
2 days ago
add a comment |
up vote
0
down vote
Just to add some detail to my solution just in case it helps anybody else in the future!
DaveAlden added a very helpful description above of what is happening which is worth reading through as it is very difficult to get a clear concise explanation of what is or should be happening with these technologies.
My project did indeed already have the cordova-android-support-gradle-release
plugin installed and it was set to 27.+
however I followed the following process and everything then started working: -
- Updated my Android SDK software to the latest
- Updated Cordova from version 8.0.0 to 8.1.2
- Removed plugin
cordova plugin add cordova-android-support-gradle-release
- Added plugin back in
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27
I then retried the build and everything then started working.
New contributor
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
In Cordova projects, the versions of native libraries pulled into the Android build via Gradle are controlled directly by the Cordova plugins you have installed in your project.
The Gradle config is dynamically generated by Cordova, so each time you run cordova prepare android
, the build.gradle
file is regenerated.
In this case, the library dependency is the Android Support Library (com.android.support
).
cordova-plugin-file-opener2
specifies version +
which will pull in the very latest version, which is currently v28.0.0 as can be seen on the releases page.
However, if another plugin in your project specifies a different version, this will lead to problems and often build failures due to version conflicts.
In a native Android project, the build.gradle
file is under your direct control, so you'd never have these problems.
One solution is to install the cordova-android-support-gradle-release plugin into your project.
This plugin overrides the versions of the Android Support Library specified by other plugins, enabling you to align the versions and so fix the build problems.
For example, in your case you can run:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=24.1.1
This will install the plugin and override the versions specified by other plugins to ensure v24.1.1 of the Support Library is included in your project.
One consideration is that v24 is quite old, so you may want to try a newer version, e.g.:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27.+
Hi Dave, appreciate your reply thank you, the project already contained that plug in cordova-android-support-gradle-release and was set to 27.+ as you suggested hence my confusion at the build error. However, now with a fresh mind and your helpful explanation I simply updated my Android SDK to the latest version, updated my cordova from 8.0.0 to 8.1.2 and then removed the gradel-release plugin and added it back in again and hey presto the app now builds again!
– Andrew Holloway-Breward
2 days ago
add a comment |
up vote
0
down vote
accepted
In Cordova projects, the versions of native libraries pulled into the Android build via Gradle are controlled directly by the Cordova plugins you have installed in your project.
The Gradle config is dynamically generated by Cordova, so each time you run cordova prepare android
, the build.gradle
file is regenerated.
In this case, the library dependency is the Android Support Library (com.android.support
).
cordova-plugin-file-opener2
specifies version +
which will pull in the very latest version, which is currently v28.0.0 as can be seen on the releases page.
However, if another plugin in your project specifies a different version, this will lead to problems and often build failures due to version conflicts.
In a native Android project, the build.gradle
file is under your direct control, so you'd never have these problems.
One solution is to install the cordova-android-support-gradle-release plugin into your project.
This plugin overrides the versions of the Android Support Library specified by other plugins, enabling you to align the versions and so fix the build problems.
For example, in your case you can run:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=24.1.1
This will install the plugin and override the versions specified by other plugins to ensure v24.1.1 of the Support Library is included in your project.
One consideration is that v24 is quite old, so you may want to try a newer version, e.g.:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27.+
Hi Dave, appreciate your reply thank you, the project already contained that plug in cordova-android-support-gradle-release and was set to 27.+ as you suggested hence my confusion at the build error. However, now with a fresh mind and your helpful explanation I simply updated my Android SDK to the latest version, updated my cordova from 8.0.0 to 8.1.2 and then removed the gradel-release plugin and added it back in again and hey presto the app now builds again!
– Andrew Holloway-Breward
2 days ago
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
In Cordova projects, the versions of native libraries pulled into the Android build via Gradle are controlled directly by the Cordova plugins you have installed in your project.
The Gradle config is dynamically generated by Cordova, so each time you run cordova prepare android
, the build.gradle
file is regenerated.
In this case, the library dependency is the Android Support Library (com.android.support
).
cordova-plugin-file-opener2
specifies version +
which will pull in the very latest version, which is currently v28.0.0 as can be seen on the releases page.
However, if another plugin in your project specifies a different version, this will lead to problems and often build failures due to version conflicts.
In a native Android project, the build.gradle
file is under your direct control, so you'd never have these problems.
One solution is to install the cordova-android-support-gradle-release plugin into your project.
This plugin overrides the versions of the Android Support Library specified by other plugins, enabling you to align the versions and so fix the build problems.
For example, in your case you can run:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=24.1.1
This will install the plugin and override the versions specified by other plugins to ensure v24.1.1 of the Support Library is included in your project.
One consideration is that v24 is quite old, so you may want to try a newer version, e.g.:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27.+
In Cordova projects, the versions of native libraries pulled into the Android build via Gradle are controlled directly by the Cordova plugins you have installed in your project.
The Gradle config is dynamically generated by Cordova, so each time you run cordova prepare android
, the build.gradle
file is regenerated.
In this case, the library dependency is the Android Support Library (com.android.support
).
cordova-plugin-file-opener2
specifies version +
which will pull in the very latest version, which is currently v28.0.0 as can be seen on the releases page.
However, if another plugin in your project specifies a different version, this will lead to problems and often build failures due to version conflicts.
In a native Android project, the build.gradle
file is under your direct control, so you'd never have these problems.
One solution is to install the cordova-android-support-gradle-release plugin into your project.
This plugin overrides the versions of the Android Support Library specified by other plugins, enabling you to align the versions and so fix the build problems.
For example, in your case you can run:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=24.1.1
This will install the plugin and override the versions specified by other plugins to ensure v24.1.1 of the Support Library is included in your project.
One consideration is that v24 is quite old, so you may want to try a newer version, e.g.:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27.+
answered Nov 17 at 19:03
DaveAlden
19.5k95392
19.5k95392
Hi Dave, appreciate your reply thank you, the project already contained that plug in cordova-android-support-gradle-release and was set to 27.+ as you suggested hence my confusion at the build error. However, now with a fresh mind and your helpful explanation I simply updated my Android SDK to the latest version, updated my cordova from 8.0.0 to 8.1.2 and then removed the gradel-release plugin and added it back in again and hey presto the app now builds again!
– Andrew Holloway-Breward
2 days ago
add a comment |
Hi Dave, appreciate your reply thank you, the project already contained that plug in cordova-android-support-gradle-release and was set to 27.+ as you suggested hence my confusion at the build error. However, now with a fresh mind and your helpful explanation I simply updated my Android SDK to the latest version, updated my cordova from 8.0.0 to 8.1.2 and then removed the gradel-release plugin and added it back in again and hey presto the app now builds again!
– Andrew Holloway-Breward
2 days ago
Hi Dave, appreciate your reply thank you, the project already contained that plug in cordova-android-support-gradle-release and was set to 27.+ as you suggested hence my confusion at the build error. However, now with a fresh mind and your helpful explanation I simply updated my Android SDK to the latest version, updated my cordova from 8.0.0 to 8.1.2 and then removed the gradel-release plugin and added it back in again and hey presto the app now builds again!
– Andrew Holloway-Breward
2 days ago
Hi Dave, appreciate your reply thank you, the project already contained that plug in cordova-android-support-gradle-release and was set to 27.+ as you suggested hence my confusion at the build error. However, now with a fresh mind and your helpful explanation I simply updated my Android SDK to the latest version, updated my cordova from 8.0.0 to 8.1.2 and then removed the gradel-release plugin and added it back in again and hey presto the app now builds again!
– Andrew Holloway-Breward
2 days ago
add a comment |
up vote
0
down vote
Just to add some detail to my solution just in case it helps anybody else in the future!
DaveAlden added a very helpful description above of what is happening which is worth reading through as it is very difficult to get a clear concise explanation of what is or should be happening with these technologies.
My project did indeed already have the cordova-android-support-gradle-release
plugin installed and it was set to 27.+
however I followed the following process and everything then started working: -
- Updated my Android SDK software to the latest
- Updated Cordova from version 8.0.0 to 8.1.2
- Removed plugin
cordova plugin add cordova-android-support-gradle-release
- Added plugin back in
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27
I then retried the build and everything then started working.
New contributor
add a comment |
up vote
0
down vote
Just to add some detail to my solution just in case it helps anybody else in the future!
DaveAlden added a very helpful description above of what is happening which is worth reading through as it is very difficult to get a clear concise explanation of what is or should be happening with these technologies.
My project did indeed already have the cordova-android-support-gradle-release
plugin installed and it was set to 27.+
however I followed the following process and everything then started working: -
- Updated my Android SDK software to the latest
- Updated Cordova from version 8.0.0 to 8.1.2
- Removed plugin
cordova plugin add cordova-android-support-gradle-release
- Added plugin back in
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27
I then retried the build and everything then started working.
New contributor
add a comment |
up vote
0
down vote
up vote
0
down vote
Just to add some detail to my solution just in case it helps anybody else in the future!
DaveAlden added a very helpful description above of what is happening which is worth reading through as it is very difficult to get a clear concise explanation of what is or should be happening with these technologies.
My project did indeed already have the cordova-android-support-gradle-release
plugin installed and it was set to 27.+
however I followed the following process and everything then started working: -
- Updated my Android SDK software to the latest
- Updated Cordova from version 8.0.0 to 8.1.2
- Removed plugin
cordova plugin add cordova-android-support-gradle-release
- Added plugin back in
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27
I then retried the build and everything then started working.
New contributor
Just to add some detail to my solution just in case it helps anybody else in the future!
DaveAlden added a very helpful description above of what is happening which is worth reading through as it is very difficult to get a clear concise explanation of what is or should be happening with these technologies.
My project did indeed already have the cordova-android-support-gradle-release
plugin installed and it was set to 27.+
however I followed the following process and everything then started working: -
- Updated my Android SDK software to the latest
- Updated Cordova from version 8.0.0 to 8.1.2
- Removed plugin
cordova plugin add cordova-android-support-gradle-release
- Added plugin back in
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27
I then retried the build and everything then started working.
New contributor
New contributor
answered 2 days ago
Andrew Holloway-Breward
31
31
New contributor
New contributor
add a comment |
add a comment |
Andrew Holloway-Breward is a new contributor. Be nice, and check out our Code of Conduct.
Andrew Holloway-Breward is a new contributor. Be nice, and check out our Code of Conduct.
Andrew Holloway-Breward is a new contributor. Be nice, and check out our Code of Conduct.
Andrew Holloway-Breward is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53322277%2fcordova-build-issue-relating-to-fontvariationsettings%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown