Closed cikcoh closed 5 years ago
I'm getting the same trying "cordova build android". Using cordova v8.0.0 cordova-android v7.1.1
"cordova build android" working before installing cordova-plugin-file-opener2.
I'm using a clean version of Cordova. Not Phonegap or Ionic.
Let me know if anyone wants me to try something to my solution. I'll respond superquick :).
.... :app:createDebugCompatibleScreenManifests UP-TO-DATE :app:processDebugManifest UP-TO-DATE :app:splitsDiscoveryTaskDebug UP-TO-DATE :app:processDebugResources/Users/administrator/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-rc02.aar/c2b52ad27232a693e96653627a391b8c/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/administrator/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-rc02.aar/c2b52ad27232a693e96653627a391b8c/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references. :app:processDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:processDebugResources'.
Failed to process resources, see aapt output above for details.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 2s 26 actionable tasks: 1 executed, 25 up-to-date (node:8023) UnhandledPromiseRejectionWarning: Error: /Users/administrator/Documents/Cordova/IVAR_App_Cordova-Branch_WIP/platforms/android/gradlew: Command failed with exit code 1 Error output: /Users/administrator/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-rc02.aar/c2b52ad27232a693e96653627a391b8c/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/administrator/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-rc02.aar/c2b52ad27232a693e96653627a391b8c/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.
FAILURE: Build failed with an exception.
@JCOlofsson hi buddy, this solution works for me from https://github.com/pwlin/cordova-plugin-file-opener2/issues/218#issuecomment-404987758
EXTRACT I have just fixed this issue by going to the platform/android folder and edited the project.properties) file and replaced com.android.support:support-v4:+ with com.android.support:support-v4:27.1.0.
@cikcoh Awesome! Thank you x10! I've been struggling with this for 2 days now. I stumbled across the plugin "cordova-android-support-gradle-release" on my train ride back from work (LifeAsACommuter). Found the suggestion at Stack overflow at https://stackoverflow.com/a/49589661/5224886.
I notice it was mentioned in the comment below the one you linked. (https://github.com/pwlin/cordova-plugin-file-opener2/issues/218#issuecomment-411014906). Recommending to use the --fetch option "cordova plugin add cordova-android-support-gradle-release --fetch"
Seems like a good fix for future cases where plugin SDK targets may vary for a while. On the other hand another plugin to depend on. I'll try out both solutions with confidence tomorrow, starting with yours winning on simplicity :)
@cikcoh Thank you
I confirme I used :
ionic cordova plugin add cordova-android-support-gradle-release --fetch
And the app compile without problems
the new version, 2.1.0, includes a feature that allows you to optionally specify a support version at run time, e.g.
cordova plugin add cordova-plugin-file-opener2 --variable ANDROID_SUPPORT_VERSION=27.+
this should help resolve the issue.