Closed glenelkinsdev closed 1 year ago
Task :app:mergeReleaseResources FAILED
Generally this means it couldn't bundle a resource file for some reason. It could be that something is referencing a resource that doesn't exists. It could be one of your resources have malformed XML. A resource could be anything from strings to physical files. For example, in your config you're manually adding something reference a string resource @string/multi_app_name
and if that resource is not actually defined, you may receive the error you're experiencing.
I'm confident that the issue isn't caused by cordova-android. cordova-android@10 only has basic resources for the icon, and cordova-plugin-splashscreen
handles the resources for splashscreens. Cordova will prepare the android project correctly. However, frameworks and plugins have the opportunity to modify, and potentially overwrite files, in which case if they do and remove things that Cordova has configured, or overwrite them in relating to resource files, it may trigger this issue.
Unfortuantely, AAPT (the android tools that handles this) doesn't make clear what the actual problem is, therefore I cannot pinpoint the exact issue, I can say it's likely caused by a plugin overwriting something that isn't suppose to, or it's caused by:
<config-file parent="/manifest/application" platform="android" target="AndroidManifest.xml">
<activity android:label="@string/multi_app_name" android:name="com.synconset.MultiImageChooserActivity" android:theme="@style/Theme.AppCompat.Light" />
</config-file>
Where nothing actually defines @string/multi_app_name
.
I advise you to check the native project. I'm not sure where ionic places things but a cordova project will place the native project at platforms/android
. The resources would be located at platforms/android/app/src/main/res
which will contain a series of folders.
By convention, things like @string/multi_app_name
should be defined inside one of the XML files inside values/
For example, Cordova will create values/strings.xml
and define @string/app_name
resource via:
<string name="app_name">Your App Name</string>
Let me know if any of this information helps.
Closing: No response
I'm at the end of my tether with this, the ionic cordova app builds fine for iOS but when i try to build for android i get this "Task :app:mergeReleaseResources FAILED"
NOTE: Right now i have to use androd 10 as 11 produces even more issues i don't have time to deal with right now.
It doesn't give me any information on what this is supposed to mean! The resources in the splash and icon folders are there so i don't know what it's talking about. Here is the output:
This is my package.json - as i say this builds no problem for iOS and this error it's giving me doesn't even make sense:
config.xml