The image could not be loaded как исправить

Не удалось загрузить изображение, на которое ссылается перо в пакете, запущенном на устройстве | Codengineering - это блог о программировании со множеством ответов и решений самых разных проблем

Не удалось загрузить изображение, на которое ссылается перо в пакете, запущенном на устройстве



SplitView[1290:307] Could not load the "canary04.png" image referenced from a nib in the bundle with identifier "xx.co.mycompany.ipad.SplitView"

Я получаю ошибку только при запуске на устройстве. Нет никаких проблем с запуском в симуляторе.

Я использую изображение непосредственно в interface builder с UIImageView.

EDIT: я добавил другое новое изображение в другой наконечник, и это не работает никаких проблем.

У кого-нибудь есть идеи?


463  


30  

30 ответов:

файловая система на устройствах iOS чувствительна к регистру, поэтому это вполне возможно проблема случая. (Mac OS X, как правило, чувствителен к регистру, поэтому вы не видели эту проблему в симуляторе.)

таким образом, убедитесь, что вы используете тот же случай в коде, что и само имя файла.

Он не может быть добавлен в вашу цель, и в XCode 4 Вы можете сделать это следующим образом:

  • в представлении проекта щелкните имя проекта
  • Выберите свою цель и выберите вкладку «этапы сборки»
  • перетащите файл изображения в раздел «копировать ресурсы пакета»

это исправило это для меня.

есть ли у вас изображение в указанной папке в XCode (синяя папка)? Если это так, вы должны включить имя папки в путь к изображению, что-то вроде «Images/canary04.png»

легкий путь

1 просто сделать в командной оболочке, чтобы найти строку ссылочного изображения:

grep -R 'canary04.png' YourMainDirectoryFolder/*

2 это даст вам (например) такой вывод:

YourProject/en.lproj/YourViewController.xib: 

<textField borderStyle="roundedRect" background="canary04.png" id="19">

3 теперь вы знаете, какой файл nib и какой элемент это. Просто зайдите в файл и удалите ссылку.

  1. удалите синюю папку, в которой находится изображение.
  2. импорт и выберите «Копировать элементы, если это необходимо».
  3. выберите «Создать группы», а не папки

Сохранить изображение в формате PNG-24. Это работает для меня

вы можете сделать это, чтобы проверить его с вашего раскадровки, или перо. Откройте его как исходный код:

enter image description here

затем «найдите» имя изображения в нем, посмотрите, существует ли оно, но уже недействительно в вашем проекте, вероятно, вы удалили или изменили его имя, и теперь оно не кажется действительным.

enter image description here

вы включили файл в цель? Щелкните правой кнопкой мыши на вашей цели в Xcode, выберите получить информацию и выберите группу «цели» в верхней части. Убедитесь, что ваши целевые объекты проверены.

Удачи.

EDIT:
Текст выше должен был прочитать щелкните правой кнопкой мыши file (canary04.png) в Xcocde и выберите получить информацию…

извините за опечатку.

У меня была эта проблема, когда я обновился до Xcode 4.4.1. Я обнаружил, что, хотя я удалил изображения (и соответствующие кнопки и т. д.) в раскадровках все еще было упоминание о них в моих файлах раскадровки (в поле tabBarItems). Я вручную прокомментировал их (), Product -> Clean, и я больше не получал ошибок.

Я знал, что в раскадровке должны быть фиктивные ссылки, поскольку я ранее удалил свою панель вкладок, и текущее приложение работало без проблем, просто с раздражающими сообщениями в консоли.

У меня была та же проблема. попробуй

  • очистить
  • построить и запустить

Это сработало со мной

в моем случае это было потому, что Photoshop не сохранял мои файлы правильно. В диалоговом окне сохранения файла я нажимал на myfile.png в попытке перезаписать этот файл, и он сохранял файл с расширением png, но в формате photoshop.

Я должен был убедиться, что на самом деле изменить формат файла в PNG, прежде чем нажать на файл, который я хотел перезаписать, тем самым сохраняя в фактическом файле png, таким образом, читаемый iOS. Интересно, что interface builder показал мои psd-as-png файлы только штраф.

более обобщенно, убедитесь, что ваш файл, на самом деле, в формате, который вы думаете, что это и что iOS поэтому ожидает.

Решение 1 :

в моем случае я скопировал папку с изображениями и даже проверено «назначение: копировать элементы, если это необходимо». Однако он не был добавлен в «Copy Bundle Resources» из «Build Phases».

вы можете добавить изображения следующим образом:

  1. выберите цели
  2. выберите «Построить Фаз» tab
  3. выберите «Копировать Пакет Ресурсы«
  4. нажать на кнопку «+» (плюс) кнопка прямо под ним
  5. найдите изображения и добавьте его

Screenshot for solution 1

решение 2 :

удалить изображения выбрав «переместить в трэш». Опять добавить изображения в вашем проекте с «Destination : copy items if needed» проверено.

Note : Make sure that you add images in Assets.xcassets folder and not outside it.

Я тоже получал эту ошибку. Я опишу свой сценарий:

У меня есть подкаталог «img», в котором есть некоторые png.
Одним из таких png является «ic_timeprogress_000.png»

в раскадровке (визуальный дизайнер) у меня был imageView и изображение было установлено на «ic_timeprogress_000.ПНГ» (не программно). Дизайнер показал imageView правильно:

imageView in subdirectory

хотя при запуске приложения, ошибка была заброшенный.

Так что в раскадровке я изменил (я настаиваю: не программно) от «ic_timeprogress_000.png » to » img / ic_timeprogress_000.png», которые приводят к неправильному отображению изображения в конструкторе, но правильно отображаются при запуске (без ошибок)

imageView in subdirectory

хотя я изменю imageView.image программно, так что это «исходное изображение» никогда не используется.

проверьте, чтобы убедиться, что canary04.png существует в вашем проекте, и что он не был удален.

моя проблема была в том, что я сохранил изображение .jpg и изменил имя на .png (все еще был в формате jpg). Он работал с симулятором

Проверьте свое имя изображения. Если Он содержит некоторые пробелы, то изображение будет отображаться во время работы в симуляторе, но не в устройстве. во время работы он проверяет с учетом регистра имя и т. д.

У меня была другая проблема в iOS 8. В моем случае проблема заключалась в том, что я выбрал устройство, специфичное для набора изображений, а затем выбрал iPad. Изменение этого обратно на универсальный Исправлена проблема.

этот параметр можно найти в изображениях.xcassets файл, в третьем столбце показать инспектор атрибутов для набора изображений.

в этом случае изображения не будут отображаться в раскадровке или файле NIB, даже если вы добавили их к изображениям.xcassets. Они также не будут показывать в тренажере или устройстве.

я столкнулся с этой проблемой, когда я пытался установить изображение imageView на Interface Builder (.файл xib).

(я использовал ресурсы изображения)

у меня было 2 изображения с theImage.jpeg и [email protected]
Interface Builder может отображать истинные изображения во время компиляции с помощью этих jpg / jpeg форматы. Но у меня есть эта ошибка во время выполнения:

Could not load the "theImage" image referenced from a nib in the bundle with identifier "org.etc.etc"

затем я изменил форматы файлов изображений на .png и это сработало!

попробуйте это решение тоже если у вас есть разные форматы для изображений, которые вы пытаетесь установить.

Я также столкнулся с проблемой, что файлы jpeg не могут быть загружены успешно, однако я решил ее, не меняя их на формат png: например, если у вас есть изображение с именем » bg.jpg», не используйте «bg» в раскадровке (это имя указано в выпадающем списке выбора), вместо этого вы должны явно написать » bg.jpg» в поле «Имя».

для программирования на основе представления изображения, я думаю, с помощью .расширением jpg, как [UIImage imageNamed:@"xx.jpg"] также должно работать (I не проверял, хотя).

попробуйте очистить проект и убедитесь, что информация.plist в матчах ХХ.ко.название_компании.для iPad.SplitView

Проверьте имя изображения. Затем проверьте, можете ли вы открыть само изображение в paint или photoshop. Если изображение было создано в photoshop и там были слои, иногда возникает какой-то конфликт с ними .png

У меня была та же проблема, если ваши изображения находятся внутри подпапок, вам нужно выбрать опцию «Создать группы для подпапок» при копировании ресурсов.

У меня есть эта проблема с Xcode 5, и кажется, что виновником является «комбинированное изображение с высоким разрешением». Я открыл пакет приложений, и все изображения были *.tiff, который вызвал изображение «не найден»: S

исправить:

Откройте настройки проекта и найдите в верхней части «объединить». Измените этот параметр на нет.

enter image description here

по какой-то причине всем не хватает этого существенного исправления.

в моем случае все изображения, где отображение нормально на устройствах с > iOS 7, но не с iOS 6.1.
Решение было в том, что iOS7 чувствителен к регистру, но iOS 6.1 не для меня. У меня были изображения с именем «myImageName», а также с именем «myimagename» ведьма приводит мой старый iPhone 3 к невозможности отображения этих изображений.
Так что переименование их решило проблему.

пробовал каждый ответ здесь и ничего, так что вот еще один глюк, ваше имя значка не может иметь точек (.) потому что если это так (и Xcode позволяет вам это делать!) хотя значки хорошо отображаются в раскадровке, они не будут загружаться ни в симуляторе, ни в устройстве.

возможно, после установки изображения кнопки вы изменили имя изображения.

2015-все еще есть эта проблема. Я ссылался на изображение, которое больше не существовало в одной из кнопок с вкладками.

устранение:
Просто осмотрите все ваши кнопки, объектами UIImage и т. д. и убедитесь, что изображение, которое вы ссылаетесь, действительно существует в вашем проекте.

Я получил эту проблему, когда я случайно добавил другой набор изображений в файл каталога активов. Я переименовал его после того, как понял ошибку, но это, похоже, не работает.

удаление файла и добавление его снова решает проблему.

то, что сработало для меня, — это убедиться, что владелец файла в interface builder имеет выход «view».

из IB выберите владельца файла из «заполнителей», затем в» Инспекторе соединений » убедитесь, что выход представления подключен к основному виду текущего XIB.

Это произошло потому, что я удалил основной вид в какой-то момент и забыл подключить Мой новый вид.

надеюсь, что это поможет кому-то еще.

в моем случае, проблема была в формате изображения. Это были файлы «jpg», в то время как Xcode ожидал файлы «png». Изменение формата файла Исправлена проблема.

Evgeniy

@Evdokim001

Начинающий PHP программист

wordpress

  • WordPress

100procentov-flowers.ru
На этом сайте в предпоследнем блоке есть фото 3Х3.
При нажатии на фото, фото должны увеличиваться но они не увеличиваются и пишет.
The image could not be loaded.


  • Вопрос задан

    более трёх лет назад

  • 66 просмотров


Комментировать

Пригласить эксперта


Ответы на вопрос 1

kosolapus

Ссылку на фото поправьте.

  • Михаил, но ссылка правильная. Что можно сделать?


Похожие вопросы


  • Показать ещё
    Загружается…

10 февр. 2023, в 04:49

50000 руб./за проект

10 февр. 2023, в 02:20

3000 руб./за проект

10 февр. 2023, в 01:33

1500 руб./за проект

Минуточку внимания

Viewing 7 replies — 1 through 7 (of 7 total)

  • Hello @anabelfructu

    Thank you for explaining!
    It might be an issue caused by a plugin or your theme.
    I recommend installing this plugin: https://wordpress.org/plugins/health-check/
    After you install and activate the above plugin it has a Troubleshooting mode which allows you to have a vanilla WordPress session, where all plugins are disabled, and a default theme is used, but only for your user – your visitors will still see the normal website.

    Go to its troubleshoot mode and only activate Gallery PhotoBlocks and see if it works correctly with a default WordPress theme (Twenty Nineteen for example) and no other plugins.

    Please let me know how it goes and what you find!

    Have a nice day ! 🙂

    All the best,
    Marian

    • This reply was modified 2 years, 4 months ago by visi19.

    Please delete.

    • This reply was modified 2 years, 4 months ago by tomcopsk.

    Hello,

    I have done what you indicate me and there’s still the problem.

    I think the problem is related to the alert I have:

    The thumbnails cache folder is not writable

    But when I go in to fix it, this message appears in another window:

    Sorry, you are not allowed to access this page.

    What can I do?

    Thank you and greetings,

    Anabel

    Hello @anabelfructu

    Can you clear the cache on the page you sent me?
    If you don’t have a plugin for this, I recommend https://wordpress.org/plugins/wp-fastest-cache/

    Please let me know if it’s work !

    Warmly,
    Marian

    Hello Marian,

    I have cleaned the cache but it still doesn’t work.

    Sorry, I don’t know than can I do.

    Thanks again!

    Anabel

    Hello again @anabelfructu

    I think your problem comes from the new version of wordpress more precisely 5.5
    To fix your problem you need a plugin that needs to be Installed and Activated, more precisely: https://wordpress.org/plugins/enable-jquery-migrate-helper/
    Thanks for your time !

    Let me know if you have more questions !

    All the best,
    Marian

    Hi!

    I have already solved it following the indications of possible errors in the same Plugin:

    iThemes Security (formerly Better WP Security) settings > System Tweaks > Configure Settings > Disable PHP in Plugins – Off. Also, System Tweaks > Filter Suspicious Query Strings – Disable.

    Thank you!!

  • Viewing 7 replies — 1 through 7 (of 7 total)

    Viewing 7 replies — 1 through 7 (of 7 total)

  • Hello @anabelfructu

    Thank you for explaining!
    It might be an issue caused by a plugin or your theme.
    I recommend installing this plugin: https://wordpress.org/plugins/health-check/
    After you install and activate the above plugin it has a Troubleshooting mode which allows you to have a vanilla WordPress session, where all plugins are disabled, and a default theme is used, but only for your user – your visitors will still see the normal website.

    Go to its troubleshoot mode and only activate Gallery PhotoBlocks and see if it works correctly with a default WordPress theme (Twenty Nineteen for example) and no other plugins.

    Please let me know how it goes and what you find!

    Have a nice day ! 🙂

    All the best,
    Marian

    • This reply was modified 2 years, 4 months ago by visi19.

    Please delete.

    • This reply was modified 2 years, 4 months ago by tomcopsk.

    Hello,

    I have done what you indicate me and there’s still the problem.

    I think the problem is related to the alert I have:

    The thumbnails cache folder is not writable

    But when I go in to fix it, this message appears in another window:

    Sorry, you are not allowed to access this page.

    What can I do?

    Thank you and greetings,

    Anabel

    Hello @anabelfructu

    Can you clear the cache on the page you sent me?
    If you don’t have a plugin for this, I recommend https://wordpress.org/plugins/wp-fastest-cache/

    Please let me know if it’s work !

    Warmly,
    Marian

    Hello Marian,

    I have cleaned the cache but it still doesn’t work.

    Sorry, I don’t know than can I do.

    Thanks again!

    Anabel

    Hello again @anabelfructu

    I think your problem comes from the new version of wordpress more precisely 5.5
    To fix your problem you need a plugin that needs to be Installed and Activated, more precisely: https://wordpress.org/plugins/enable-jquery-migrate-helper/
    Thanks for your time !

    Let me know if you have more questions !

    All the best,
    Marian

    Hi!

    I have already solved it following the indications of possible errors in the same Plugin:

    iThemes Security (formerly Better WP Security) settings > System Tweaks > Configure Settings > Disable PHP in Plugins – Off. Also, System Tweaks > Filter Suspicious Query Strings – Disable.

    Thank you!!

  • Viewing 7 replies — 1 through 7 (of 7 total)

    @R-N

    I’ve been getting «Image could not be loaded. Try changing image decoder …» when opening chapters I downloaded. I’ve been experiencing this since I updated the app on late March or early April.

    It only happens on downloaded chapters. Reading online (in app) works just fine, it loads quickly too, with the same connection and within just a few minutes after I downloaded the chapter and deleted it because it cant be loaded. The download was about as quick.

    Changing the decoder before or after downloading doesn’t help.

    I’m mainly using MangaSee. Just tried MangaRock, same thing happened. Havent tried other sources since most sources are unavailable to me as my ISP block em, but if you want me to try a source to test please say so.

    Some example of the mangas are Shokugeki no Soma and Boku no Hero Academia.

    Redmi Note 4X
    Android 7.0 stock
    ver. 0.7.3, still persists on 0.7.4

    @metroxx

    0.7.3
    Xiaomi redmi note 4
    Android 7.0
    Same.
    But i am using kissmanga and recently mangadex. Randomly tried mangafox too. It seems like it happens with every site.
    I can read it fine in app or in browser.
    I tried to download 5 different new manga uploads. I thought maybe that was it. But then i tried older series too.
    What i tried:
    Kissmanga: one piece, fairy tails, amamo megumi wa Suki darake
    Mangadex: henjyo, Pashiri na Boku to Koisuru Banchou!
    Mangafox: bleach

    @R-N

    Hey, same phone and android ver. Not sure if it matters though.

    Oh, right. I forgot to mention the Tachiyomi ver; it’s also 0.7.3.

    @metroxx

    They always ask for it, so yeah, it could matter.

    @mr-gmz

    Had the same problem and finally got it fixed
    Basically I had to create a backup of my library, clear all the application data and the restore the backup
    I assume some got corrupted somewhere and was causing the problem, working like a charm now

    @metroxx

    I did that. Didn’t worked out.

    @robkooper

    I have the same problem, this is with chapter 3 and 4 of magic app store comic on kissmanga. If I open the comic in the browser it works fine, if I try to view the comic in the app it does not show, just shows the spinning circle as if it is decoding/downloading the image. This is with 0.74.

    @metroxx

    I tried every stock source site. None of it works or just partially works like in case with Bijin Onna Joushi Takizawa-san every second or third chapter is download without issues. It works when u read it in browser or in app.

    @R-N

    @metroxx

    I noticed something.
    So when u go in the download abd check the manga’s folder it has a 0b file without extension with the chapter number. The file couldn’t be deleted in the file explorer.
    Also overtime it will download the chapter without the app mentioned it.
    Example «Bijin onna…» i said that every 2or3 chapter worked the rest had this «image couldn’t be» but today without redownload the chapters that had this problem worked without problem. I have no idea why. Because i hadn’t touched the app since i last commented here.

    @jotapbmpl

    When i download a chapter and open the message that image can’t load still appears. Any one got a solution?

    @R-N

    Ok so I noticed that it may be an issue with the source, or maybe an extension issue.

    Mangasee, Manga Rock, and MangaDex works only with Rapid decoder.
    Mangahere works with Image and Skia.
    Manga Eden works with Image and Rapid.
    None works with Readmangatoday (yes I can read online in the app)

    Even if it’s an source/extension issue, can we have a per-source image decoder setting feature?
    Many extensions havent been updated since ages, and idk where to report extension issue.

    @metroxx

    Issues still exists.
    Even with using rapid on mangadex.

    @R-N

    Nvm, I was wrong. Even with rapid not all manga works on the source I said it worked with, only some.

    @LuteFlute

    Anyone got a fix? I’m having similar problems but downloaded manga works fine for me, some non downloaded manga works with some

    Image works with most Kissmanga, Mangafox some Mangarock, Mangadex,
    Rapid works with most Kissmanga, Mangadex, Mangafox, and Magnarock
    Skia, again it works with most Kissmanga, Mangadex, Mangafox, and Mangarock

    @metroxx

    Still have problem. It’s random when or why it happens. I thought it was
    because new manga. Then new chapter.
    But no. It doesn’t matter it just happens.

    LuteFlute <notifications@github.com> ezt írta (időpont: 2018. júl. 29., V
    15:23):

    Anyone got a fix? I’m having similar problems but downloaded manga works
    fine for me, some non downloaded manga works with some

    Image works with most Kissmanga, Mangafox some Mangarock, Mangadex,
    Rapid works with most Kissmanga, Mangadex, Mangafox, and Magnarock
    Skia, again it works with most Kissmanga, Mangadex, Mangafox, and Mangarock


    You are receiving this because you commented.
    Reply to this email directly, view it on GitHub
    <#1415 (comment)>,
    or mute the thread
    <https://github.com/notifications/unsubscribe-auth/APqAGrPmV9Yd4KnBI_kAuqEDh3ImvM2xks5uLbczgaJpZM4T7vvM>
    .

    @B4rabbas

    I have the same issue also with local manga. I think this could be a problem with specials caracters in metadata or filenames.
    Ex :
    (tag) [teampouetpouet] **& # {fantranslate}

    @metroxx

    Actually when it’s about downloading stuff it’s kinda works like steam. It
    creates files and downloads them after it. I noticed it a few time too.
    Whenever i got image couldn’t be loaded it was solved by itself without
    notifying the user that it’s downloading right now like it does when we
    start it.

    Barabbas <notifications@github.com> ezt írta (időpont: 2018. aug. 26., V,
    17:21):

    @elfend

    hello… this problem caused when u downloaded placed on external storage… and this problem occured if ur android enable «mock sd card optimization», so it simply fix t problem with turn it off…
    if ure using xiaomi/MIUI please follow this step:

    1. enable developer option in setting>about phone>and tap «MIUI Version» 8 times
    2. go to dev option, setting>additional setting>developer options
    3. and turn of «mock sd card optimization»
    4. restart your phone

    hope this help…

    @inorichi

    Since 0.8.0 there’s just one decoder that works with pretty much everything. I’d say images are corrupted if they are not loaded now.

    @xurry26

    No se si me vayan a entender pero tengo un problema con tachiyomi eh ya q al poner ex hentay no me muestra ni los mangas ni nada y ni por mas que le doy a reintentar checar el problema

    @BelDOT

    Is R-N still around for help?
    I need help with a bit and I saw he had answered someone’s questions last year.. he seems to have disappeared

    @github-actions
    github-actions
    bot

    locked as resolved and limited conversation to collaborators

    Apr 12, 2021

    Понравилась статья? Поделить с друзьями:
  • The hunter call of the wild ошибка при запуске error report
  • The installer has encountered an unexpected error 2503 gameguard
  • The hunter call of the wild has stopped working как исправить
  • The hunter call of the wild error report что делать
  • The hub as encountered a critical error and must close