breautek commented on issue #1582: URL: https://github.com/apache/cordova-android/issues/1582#issuecomment-1492090521
Alright thanks. The `themes.xml` actually looks fine and expected here. So I don't think the crash is from what I was originally expecting. However, I see you're using an XML vector for your icon. `res/drawable/ic_logo_pickup.xml`. **If this is an SVG**, then read on. If not, skip down below. Android has limited support for SVG directives and can result in a crash if you're using an unsupported directive. Android Studio does have a tool called [Asset Vector Studio](https://developer.android.com/studio/write/vector-asset-studio) which can be used to import an SVG and convert it to an AVD (Android Vector Drawable), and if the SVG does have something that cannot be converted, it should provide the appropriate feedback. To access the Vector Asset Studio, you'll need to open up the project in Android Studio (available in `<cordova-project/platforms/android`). Android Studio may prompt you to update plugins like Android Gradle Plugin. **DO NOT UPDATE**, as it will likely break the cordova project. SImply dismiss the prompt. On the left tab, you should see `Resource Manager`: <img width="620" alt="Screenshot 2023-03-31 at 12 03 28 PM" src="https://user-images.githubusercontent.com/11200662/229157694-07481efd-c05f-420b-8551-5aa0a4acc613.png"> From there, click on the `+` Icon to add a `Vector Asset`, which will open a dialog where you can import an SVG. <img width="701" alt="Screenshot 2023-03-31 at 12 04 54 PM" src="https://user-images.githubusercontent.com/11200662/229158046-b6983ceb-a7ef-4185-92cb-52088796df5a.png"> Click next and it will show you will it still store the asset. You'll need to copy the asset back to your root cordova project (rather than leaving it in the generated native project). Android Studio should have placed it in `<cordova-project>/platforms/android/app/src/main/res/drawable/<name_you_have_chosen>.xml`, which should be copied to your `res/drawable/` folder (same location as your `ic_logo_pickup.xml` as referenced in `config.xml`. Now when you generate the android project, you will have an AVD vector that will get copied. **If the xml is already an AVD**, then if you could share the icon as well as a [minimal reproduction app](https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md) that uses the vector, but without any additional plugins, I would suspect that it will be enough to trigger the crash. If so, sharing that reproduction app might help us drill down deeper. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
