Error - Android failed linking resource on androidx CardView widget - android-studio

All the XML files are ok, I have checked and they have no errors, this error started soon after I copied my card-view code to various xml files, the card-view code was once working perfectly in one file, before
I generated other layouts from it
On all these XML files the needed resources are grayed out, see below

Please check whether the cardview tag is closed properly
if yes, can you add full .xml file

Related

Issue in creating Layout in Liferay DXP

I am trying to create a layout in Liferay DXP using themegenerator by following this link : https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/creating-layout-templates-with-the-themes-generator-0.
On successful completion of the steps mentioned in the link, -layouttpl gets generated but .tpl file and .png file are not getting generated. What can be the issue?
I created layout with theme generators, but i found inside 'yourlayoutname/docroot'.
Please make sure you followed all steps, mentioned in - in document you shared link. Once you created layout, you have to define rows and columns of layout. Pls make sure you followed all instructions.

Exception when trying to use icons from Asset Catalog in iOS project with Xamarin TabbedPage

I create a Xamarin Forms project in VS 2017 and started by adding a TabbedPage with three tabs. I then added the icons to the Android (in Resources/drawable) and iOS (Asset Catalogs/Icons) projects.
When I start the project on Android it works fine, but on iOS I get an exception that the UIImage cannot be loaded because initWithCOntentsOfFile returned nil. Which is actually correct, because that's not the correct method to use to access Assets. But it's the TabbedPage calling the method, so I cannot do anything about it.
The TabbetPage looks pretty basic.
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:GreenThumb"
x:Class="GreenThumb.MainPage">
<NavigationPage Title="Today" Icon="current.png">
<x:Arguments>
<local:Current />
</x:Arguments>
</NavigationPage>
<NavigationPage Title="Overview" Icon="overview.png">
<x:Arguments>
<local:Overview />
</x:Arguments>
</NavigationPage>
<NavigationPage Title="Settings" Icon="settings.png">
<x:Arguments>
<local:Settings />
</x:Arguments>
</NavigationPage>
</TabbedPage>
And the Asset Catalog looks like this:
This problem seems to be pretty old, but I haven't found any solutions aside some very dirty hacks.
Is there a clean solution out there? Or do I just have to add all my images in the Resources folder instead of Asset Catalogs?
I struggled in the past on this issue. It seems that icons for tabbed pages are not working in iOS if placed in the .xcassets.
I moved those .png files inside the Resources folder and that made the magic.
I suppose it's a kind of bug on Xamarin.
The same error was occurring to me, and I was putting the images on the .xcassets on iOS.
When I placed the images on the Resources folder, they appeared normally on my TabbedPage.
In the official Xamarin documentation about images, they say to put the images in the Resources folder.
iOS - Place images in the Resources folder with Build Action:
BundleResource. Retina versions of the image should also be supplied -
two and three times the resolution with a #2x or #3x suffixes on the
filename before the file extension (eg. myimage#2x.png).
I place all my images in the .xcassets folder, they apparently work well, but it seems not to work on every case.

Android Studio can't resolve resource drawable

I'm designing my layout, and I've exported many assets from Sketch. Everything's going fine, but on just one particular asset, I'm getting the following error:
The resource is there, included in the project, I can open it (a regular PNG) perfectly etc, and is no different from any other assets in any way.
When I click Details on the error above, I get:
java.lang.NumberFormatException: Color value '#drawable/comment_off' must start with #
at com.android.layoutlib.bridge.impl.ResourceHelper.getColor(ResourceHelper.java:79)
at com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:270)
at android.content.res.BridgeTypedArray.getDrawable(BridgeTypedArray.java:729)
at android.widget.ImageView.<init>(ImageView.java:152)
at android.widget.ImageView.<init>(ImageView.java:140)
at android.widget.ImageView.<init>(ImageView.java:136)
...
Why on Earth does Android Studio think that my drawable is a color, while it's a PNG image like all the other assets in my project?
You may want to check the spelling of your drawable folder to ensure it is correct, and that the image exists at the referenced assets folder.

IntelliJ IDEA Scratch File: JSF xmlns URI not registered

From the Intellij website:
Scratch Files, a very handy feature that helps you experiment and prototype. With this feature you can sketch something really quick right in the editor, without modifying your project or creating any files.
You can open an infinite number of Scratch Files and easily switch between them. IntelliJ IDEA will provide all of its coding assistance features for these files according to the type you will select for them in a status bar widget.
However, when I create a facelet scratch file the "URI is not registered" error appears, none of the tags are recognized, and tab-completion of tags as I type does not happen.
I create the new facelet scratch file as follows:
Tools -> New Scratch -> XHTML file
When the mouse hovers over one of the red-highlighted xmlns lines a balloon pops up: URI is not registered (Settings | Project Settings | Schemas and DTDs). When the mouse hovers over the h:outputLabel tag a balloon pops up: Cannot resolve symbol: 'h:outputLabel'. However, in my project there are no such errors in any of my Facelet files.
According to Jetbrains, "IntelliJ IDEA will provide all of its coding assistance features for these files according to the type you will select for them in a status bar widget." Is this just a broken feature or is there a way to resolve this problem? It's completely not useful to have a XHTML scratch file that does not provide coding assistance.
UPDATE:
Changing to java.sun.com namespace does not resolve the issue:
I've fixed this issue on IntelliJ. In "settings > plugins", install "Jakarta EE:Server Faces(JSF)" or enable it

Path to layout xml files in magento

I have seen that we can place our layout xml files in
app/design/frontend/default/default/layout
or we can place our customization inside
app/design/frontend/base/default/layout/local.xml
file, but I have read at magebase and at magentocommerce that we can place our layout files under
app/design/frontend/your_interface/your_theme/layout/
or
app/design/frontend/[package]/[theme]/layout
So if we I have package like 'Kaushikamdotcom' in 'app/code/local', should I have to create that same package under 'app/design/frontend/' ? I tried many patterns, but nothing worked out for me.
I am quite sorry that I have made such a blunder asking this question, but I am answering this as lots of people will be making the same mistake. Package means; in the admin side of magento open
System->Configuration->Design
Then change the configuration scope to Main website. Then select Package section, uncheck the default check box and use your package name such as "Test". Then create the following folder structure.
app/design/frontend/Test/default/layout
Place your layout xml files here. If you are using your own themes use that name instead of default.
It depends what layout-xml file you have.
If you want to build up your theme, use the local.xml file in your theme dir.
If you write an extension and want to add a block to use inside this new extension, add a layout-xml file via config.xml and add it under base/default/layout/yourname.xml
When you do it this way, your theme-related changes only appear in the theme and your extension-related changes are theme-independent

Resources