Getting the following error: Unable to resolve "../assets/icon.png" from "app\assets\screens\WelcomeScreen.js" - react-native

When I try to run my app I get the error
Unable to resolve "../assets/icon.png" from "app\assets\screens\WelcomeScreen.js"
Error: Problems validating asset fields in app.json. See https://docs.expo.io/
• Field: icon - cannot access file at './assets/icon.png'.
I created a screens folder and input my homescreen into it as I heard that the majority of the react native community does things that way. Attached is a picture of my filesenter image description here
I think that the image path is off, however I had changed it multiple times and am still getting the same error.
Any help would be appreciated.

try the following: ../icon.png
Cause that's what I can see from your file structure.
If you use visual studio code as dev tool, when you type path cue, correct path will be appeared. so you can avoid to make mistake in path of image.

Related

Find invalid image paths in vue project

In my Vue 3 project, all images are located in public/assets/image then in .vue files I refer to these images like assets/image/image.png.
Sometimes I might make a typo in a path or a path might not be correct anymore.
Is there any automated way to find and fix all incorrect paths in a project?
I am using "VS Code" and "IntelliJ IDEA" might be there are any plugins to handle this.
In VS Code there is an extension called Image preview
https://marketplace.visualstudio.com/items?itemName=kisstkondoros.vscode-gutter-preview
If the path is right it shows the image at the left side of the import.

Xcode 5 invalid image path error

Im relatively new to programming and am just in the process of uploading my first app to the app store however i am getting the following error message which i just can't figure out / fix. I have looked everywhere online for a solution but as yet, no luck. Please can someone help? I am using Xcode 5:
Error:
ERROR ITMS-9000: "Invalid Image Path - No image found at the path referenced under key 'CFBundleIcons': 'AppIcon40x40'" at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)
This really doesn't mean anything to me as i have tried all the usual asset catalogue stuff / looked at my p-list.
You need an App Icon.
If you created the project in Xcode 5 then there should be a catalogue called Images.xcassets where you should place the icons of the correct sizes for your app.
I have added a screenshot of my app as an example of what I am talking about:
I saw the same error. First I thought that the images where not correct (I found one with 144 dpi), but the error showed up again.
Just search for the exact name "AppIcon40x40" in the whole project using Shift+Cmd+F. I have seen it referenced in a plist file under another key. There you have to change the names to the appropriate ones.

Path to VersionInfo.plist from app bundle

I am currently working on CoreData, but I am getting some errors. I have tried all the solutions stated on StackOverflow, except for one:
Make sure the NSManagedObjectModel_CurrentVersionName is correct.
There are posts of people suggesting going to app bundle -> coreData.momd -> VersionInfo.plist to do the checking.
However, I cannot even find where my app bundle is. I can find my build folder with intermediates and products. However, nothing in those folders direct me to the app bundle.
Any help or suggestion is greatly appreciated.
Thanks.
You can find the currently selected version by selecting the .cxdatamodeld file in the Project Navigator pane on the left of the screen. Then, in the Utilities pane on the right of the screen select the File Inspector and under Versioned Core Data Model is the selection for "Current". This should show your current data model.
Open terminal and type the following command:
find / -name "VersionInfo.plist"
Mine is in "./Users/blossomwoo/Library/Application Support/iPhone Simulator/6.1/Applications/DB103D5D-9FFA-4E95-9715-944E8E339FCB/.app/DataModel.momd/"

NSUbiquitousKeyValueStore error : "com.mycompany.myappname" has no valid com.apple.developer.ubiquity-kvstore-identifier entitlment

I set the entitlements file correctly.
I'm getting the cloud url.
the error happen after im trying to save values in the keyValue store.
I can write and read from the NSUbiquitousKeyValueStore,
But after the method finished, I got the error I wrote in the title of the question.
this error happen on ipad 1,
when compiling the same project to the iphone, it works ok without error.
This usually happens when you download your app from the AppStore and update it using XCode.
Have a look at the "Recommended Testing Procedure" in Technote 2285
Are you using different targets for iPhone and iPad versions of your app? Check your entitlements file and make sure it has the correct values for organization all targets.
You might also want to do a text search in your projects folder and see if any files contain the line "com.mycompany.myappname".

Using btn_circle_normal - android

I tried to use the standard icons provided by android as the background for my ImageButton using:
android:background="#android:drawable/btn_circle_normal"
btn_circle_normal seems to be present in the sdk directory. However, I get the error:
error: Error: Resource is not public. (at 'background' with value '#android:drawable/btn_circle_normal').
What could be the possible cause for the same and also the solution.
Thanks in advance
these Ressources are private and you may not use them in your styles. You could however create your own style, that mimics the same thing. Just download the extracted rounded PNGs and create a file like rounded_buttons in your src/drawable Folder. You can find a good tutorial (Google-Translate it first).