Ionic 5 Android签名图像未显示



android的签名版本不显示图片。这个应用程序是在Ionic 5中,只有在android版本中有这个问题,而在iOS中它可以工作。

这是我如何设置图像标签:
<img class="featured-book-cover" [src]="book.url">

我试图设置src属性与修复url

不这个<<p> strong> 工作:
<img class="featured-book-cover" src="https://copertine.hoepli.it/archivio/978/8836/9788836009138.jpg"/>

这部作品:

<img class="featured-book-cover" src="https://apps.edigeo.it/copertine/9788836009138.jpeg" />

考虑到您确信对象在应用程序为用户显示页面时存在,并且url在SSL证书(https)下。看看你的img tag,你好像没有关闭标签。请试着这样做:

<img class="featured-book-cover" [src]="book.url" />

在我的睾丸中,你的两个图像都很好。所以请,你能看到并分享你的元标签<meta http-equiv="Content-Security-Policy" content="default-src *; media-src *; connect-src *;">声明在index.html文件,只是为了确保没有阻塞图像。

你在Ionic中使用Cordova或Capacitor吗?在Cordova的情况下,请查看config.xml文件,看看Cordova允许列表是否能够访问多个域:

<access origin="*" />
<allow-navigation href="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />

如果您正在使用电容器,请查看capacitor.config.ts文件,并检查是否有一些代理,并根据需要进行设置,或者在必要时清理它。

  server: {
    url: 'https://your-domain.com',        
    allowNavigation:[
      'your-domain.com',
      '*.your-domain.com/*',
      'localhost:8100/*'
    ]
  }

最新更新