New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ionic 4: Ionicons not shown on Android #14509
Comments
yep, we got the same problem. |
same problem here with Alpha 7! |
I added this snippet in the angular.json file {
"glob": "**/*.svg",
"input": "node_modules/@ionic/angular/dist/ionic/svg",
"output": "./svg"
}, and used |
@orlyapps what you descripe is only working in browsers, but not as native android app, isn't it? BTW is that the normal integration of Ionic icons which is used in Ionic Conference App, too. |
I'm also seeing this issue on alpha 7. <ion-icon
ios="ios-wifi"
md="ios-wifi"
slot="start">
</ion-icon> |
@paulstelzer yes it only works in the browser :( Any updates on this issues? Kinda annoying ;) |
Think using the Ionicons font (instead of svgs directly) is at the moment the only choice to use the icons on Android |
Since Ionicons v4.1.2 was released, here is my quick setup that piggybacks on @orlyapps's fix (still just browser currently: I've never gotten any icons to load on Alpha 7 so this is a huge improvement for me):
I wish that were more helpful, but at least it's up-to-date(ish)... |
@MT-- Why so complicated? If you just want to use ionicons on browser, this is already included in So you only need to add the following:
|
@paulstelzer it relies on |
@MT-- & @paulstelzer I've spent some time now updating a very old Ionic app (ionic-angular: 2.0.1) to Ionic V4 and it all seems to be working very nicely but I cannot display the arrow-back icon in toolbar when building to Android phone:
The app navigates OK, but arrow-back does not display and I see same error as @paulstelzer reported here. To upgrade this app I started with a completely new V4 project:
& moved my files over/updated from the old project. angular.json already included:
but even if I used:
still no luck. All of these files are valid in the project node_modules. The app works fine in browser with |
@kinggolf If you really need ionicons, you have (at the moment) use the ionicons font. Either integrate the font into your app or just insert the following in your index.html
Now you can write But if you can wait, then it's the best thing to wait because the ionic team will fix it with the official release of ionic 4 |
@paulstelzer Thank you. I only need the arrow-back in the toolbar used by |
The issue is present on Android for the tabs starter as well. |
Same here, works on IOS but not on android. |
Does anyone have a workaround? This is my info: cli packages: (/Users/matheusdavidson/.nvm/versions/node/v9.10.1/lib/node_modules)
@ionic/cli-utils : 2.0.0-rc.6
ionic (Ionic CLI) : 4.0.0-rc.6
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@angular-devkit/core : 0.6.0
@angular-devkit/schematics : 0.6.0
@angular/cli : 6.0.1
@ionic/schematics-angular : 1.0.0-rc.6
Cordova Platforms : android 6.3.0
Ionic Framework : @ionic/angular 4.0.0-alpha.7
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
NodeJS : v9.10.1
npm : 5.8.0
OS : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145
Environment Variables:
ANDROID_HOME : /Users/matheusdavidson/Library/Android/sdk/ |
Tried to use another webview(crosswalk) but no luck =/ |
The icons won't show on ios or android devices because of: ionic-team/ionicons#552
Had to make a production(--prod) build to see that error. |
Hello all! This has been fixed with the latest versions of Ionic and our new beta version of the webview plugin. To get the fix first make sure you have the latest version of ionic 4 (npm install @ionic/angular@4.0.0-alpha.10 --save-exact) and then run these two commands |
Hey @jgw96, the problem is still present in the latest beta. I have just installed ionic beta 0, generated a new app and build to device, icons still not displayed. Tried to uninstall ionic-webview, which was 2.0.1, installed it again(2.0.2) and tried to build to android, nothing. |
sorry, it works, the problem was my version of cordova-android which was under 6.4 |
icons now work with latest cordova-android but sometimes, after navigation they doesn't, is intermittent now |
@jgw96 icons are still not being displayed in android. Works when run the app using ng serve i browser # |
@rohitkrishna12 It's working. Please make sure to use the latest ionic webview cordova plugin (See Migrating to 2.x https://github.com/ionic-team/cordova-plugin-ionic-webview ) |
UPDATE: i updated the android to 8 and the icons are working. it would be nice if ionic shows the base android api support. @paulstelzer i tried updating the webview cordova plugin as suggested in the link. i used side menu as a starter template for the project. i tried tabs and it same issue.
|
I still have the same problem. Fresh installation of Ionic v4:
Ionicons package v4.3.0
|
I use capacitor, run on real device, android 7, no icon can be shown.
|
I tested it again with the following packages
and it works like a charm on ANDROID! UPDATE: Also working without problems on iOS! |
it is nor working for me
It is working fine on browser but it not working real device |
@paulstelzer could you please help out this issue |
Upload a repository and I can check |
I've checked this issue again with updated dependencies as suggested and it's working for me too. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic Info
Describe the Bug
The ionicons are not shown on Android when using Ionic 4 (and so Iconicons 4.x). In console you can see the error message: "Fetch API cannot load file:///android_asset/www/svg/md-arrow-forward.svg. URL scheme "file" is not supported."
Steps to Reproduce / Related Code
Just use the Ionic Conference App (Branch: core-update - https://github.com/ionic-team/ionic-conference-app) let it run on Android (ionic cordova run android)
Expected Behavior
THe icons should show
The text was updated successfully, but these errors were encountered: