Receiving an error within Google Play Library in Eclipse - eclipse

I am new to eclipse and receiving this error
error: no resource found that matches the given name (at 'drawable' with value '#drawable/ common_google_signin_btn_icon_dark_disabled').
Here is my common_google_signin_btn_icon_dark.xml file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_enabled="false"
android:drawable="#drawable/common_google_signin_btn_icon_dark_disabled" />
<item
android:state_pressed="true"
android:drawable="#drawable/common_google_signin_btn_icon_dark_pressed" />
<item
android:state_focused="true"
android:drawable="#drawable/common_google_signin_btn_icon_dark_focused" />
<item
android:drawable="#drawable/common_google_signin_btn_icon_dark_normal" />
</selector>
Any help would be appreciated thanks

This seems like a case of missing files. You are using a drawable image/resource that doesn't exist. Go to your drawable folder and make sure you have those png (PNGs are normally used for buttons)images namely: common_google_signin_btn_icon_dark_disabled.png, common_google_signin_btn_icon_dark_pressed.png, etc.
This SO post, although not exactly same, may offer insight.

Thanks for the reply, files were probably missing in the library because i was able to upload a newer version of google play services library and worked perfect.

Related

OmniFaces <o:tagAttribute> not working under some circumstances

I have a project where OmniFaces 2.6.8 is used. In this project I have some facelets tag files, which use OmniFaces' <o:tagAttribute>. For some of my tagfiles I noticed strange behavior, which means, the <o:tagAttribute> seems not to be working and I get
IllegalStateException: Duplicate component ID 'myForm:outer' found in view.
as a result, because the id-attribute of my outer tag is not cleared and thus reused in the inner tag (just as demonstrated in OmniFaces' show-case).
I could reproduce the problem with two very simple tag-files. Here is how I use those tag-files first:
<h:form id="myForm">
<my:outer id="outer">
<my:inner />
</my:outer>
</h:form>
And here is the complete code of the tag-files.
outer.xhtml:
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:o="http://omnifaces.org/ui">
<o:tagAttribute name="id" />
<h:panelGroup id="#{id}">
<ui:insert/>
</h:panelGroup>
</ui:composition>
inner.xhtml:
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:o="http://omnifaces.org/ui">
<o:tagAttribute name="id" />
<h:inputText id="#{id}">
<ui:insert/>
</h:inputText>
</ui:composition>
I noticed, that the problem does not arise, as soon as I change inner.xhtml to use <h:outputText> instead of <h:inputText>. It also disappears, when I add a value-attribute to the <h:inputText>.
Is this a bug in OmniFaces, or am I doing something wrong?
(Update: I created an issue in the OmniFaces bugtracker.)
My environment
OmniFaces 2.6.8
Mojarra 2.2.15
Wildfly 10.1.0.Final
This was a bug in OmniFaces 2.6.8, which was fixed (but not mentioned in the changelog) in OmniFaces 2.6.9. Exchanging the dependency version of OmniFaces is enough to solve the described problem.
Update: Note, that there is also a related issue, which was fixed in 2.7.1.

Adding popup description to custom JSF tags in Eclipse

I have a list of custom JSF tags, declared in an xml file in the following format:
I'd like to provide the developers documentation for these tags that shows up in eclipse like the one for the builtin JSF tags.
How can I achieve this?
Start by using a WAAAAY more current taglib... a 2.2 one would be good...
<facelet-taglib
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facelettaglibrary_2_2.xsd"
version="2.2"
>
Then you'll notice (via code completion) that inside the <tag> elements you can add a <documentation>
See e.g. https://github.com/omnifaces/omnifaces/blob/2.6.4/src/main/resources/META-INF/omnifaces-ui.taglib.xml

excluding some js file from minification in com.day.cq.widget.impl.HtmlLibraryManagerImpl

I have a osgi config settings for config\com.day.cq.widget.impl.HtmlLibraryManagerImpl.xml
as follows:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
htmllibmanager.minify="{Boolean}true"
htmllibmanager.debug="{Boolean}false"
htmllibmanager.gzip="{Boolean}false"
htmllibmanager.timing="{Boolean}false"
/>
however, I want some files not be minifyed. How can I do that ?
Since AEM 6.1 the com.day.cq.widget.HtmlLibraryManager interface and its implementation (com.day.cq.widget.impl.HtmlLibraryManagerImpl) have been deprecated.
Instead, you should take a look at new HtmlLibraryManager interface.
The com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl implementation has interesting OSGi property "htmllibmanager.excluded.path.list" that might just be what you need.
I had read the solution to this problem in adobe forums, given by
Sham HC
According to him, OOB not possible & you might need to implement own HTMLLibraryManager. File daycare requesting feature pack.
If you have taken look at the below link you can take advantage of selector and at dispatcher OR linkrewriter remove .min for your request.
New in AEM
Use a manual include to be able to choose if minified or not. Nothing to change in your clientLibs. Using "htmllibmanager.excluded.path.list" doesn't work for me and I can read in documentation that cq:ClientLibraryFolder can not be exclude because it's hardly specified that's a clientLib.
To make something like this (css):
<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientLib.css # categories='yourClientLib}" data-sly-unwrap/>
Use:
<link rel="stylesheet" type="text/css" href="/etc/designs/yourClientLib.css"/>
And to make this (js):
<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientLib.js # categories='yourClientLib'}" data-sly-unwrap/>
Use:
<script src="/etc/designs/yourClientLib.js"></script>
So if you don't want minification your files will end with ".js" and if you want minification your files will end with ".min.js". Realy easy.

In Magento 2 How to Override core customer model?

I have to override customer ResourceModel's customer.php file in my custom module.
I have tried but its not working.so what is correct way to override Model?
Please help me.
I follow below steps to override Model,
I have my own module called Namespace_Module with a di.xml file,
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
<preference for="Magento\Customer\Model\ResourceModel\Customer" type="Namespace\Modulename\Model\ResourceModel\Customer" />
</config>
Then I have created php file,
Namespace\Modulename\Model\ResourceModel\Customer.php
and try to override core file.but its not working for me.
So plz anyone help me to solve my problem.
thanks.

How to add two help contents in eclipse RCP application?

In my application I want to add two help contents. Currently I have only one contents in my help book. To add a new one I have declared another help plugin and Tried to add that in to product dependencies. But my second help did not appear in the help book. Am i missing something here?
2 contents snapshot:
I want to do something like this
Any help on this will be appreciated.
Toc.xml
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
<toc label="XXX">
<topic label="Main Topic" href="html/maintopic.html">
<topic label="Sub Topic" href="html/subtopic.html"/>
</topic>
<topic label="Main Topic 2"/>
</toc>
Looking at the Eclipse help plug-ins they just use:
<extension point="org.eclipse.help.toc">
<toc file="toc.xml" primary="true" />
</extension>
in each plugin.xml. The toc.xml is like yours.