I am trying to follow this solution Broadcast Receiver Not Working After Device Reboot in Android, but I get the following error:
No resource found that matches the given name (at 'resource' with value '#xml/my_accessibility_service').
With my_accessibility_service.xml :
<?xml version="1.0" encoding="utf-8" ?>
<accessibility-service
xmlns:android="http://schemas.android.com/apk/res/android"
android:packageNames="myapp"
android:accessibilityFeedbackType="feedbackSpoken"
android:description="#string/service_desc"
android:notificationTimeout="100">
</accessibility-service>
Why is it happening?
Thanks.
I solved the compile error by transferring the file at layout folder and instead or #xml wrote #layout.
Related
I'm trying to build my Xamarin.Forms project and running into an unexpected error "'cxmlns' is an undeclared prefix. Line 3, position 14". I've tried searching the web for a solution to this but not fining any. I've seen other similar problems and I tried solutions that worked for others, but nothing that worked in my case so far. Here is my MainPage.xaml code:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
cxmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:DojoBoss"
x:Class="DojoBoss.MainPage"
BackgroundImage="background1">
</ContentPage>
I find it strange that I'm getting this error since this is all stock code that came with the blank app from Visual Studio (VS) aside from 1 line where I put in a background image. This was also working fine earlier today, I didn't make any changes but now it doesn't work. I've been disappointed with VS and Xamarin so far, seems very buggy and difficult to get started. Here's what I've tried so far:
Build project
Rebuild project
Clean project
Deselecting all projects from build (I have a main project + Android and Windows projects), applying changes, cleaning, building, re-selecting all projects to build multiple times in different orders.
Deleting bin and obj folders
Reopening VS multiple times
Deleting .vs folder, including the .suo file
Removing the line of code where error is thrown
Checking the build order
VS is also giving me 4 other errors which may be related to the problem:
Error CS0006 Metadata file 'C:\Users...\bin\Debug\netstandard2.0\DojoBoss.dll' could not be found
The "ResolveLibraryProjectImports" task failed unexpectedly.
Cannot resolve Assembly or Windows Metadata file 'C:\Users...\bin\Debug\netstandard2.0\DojoBoss.dll'
The name ‘InitializeComponent’ does not exist in the current context
I do not know what is this "cxmlns". Can we change this line
cxmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
to
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
WinRM command line allows the creation of a new shell command instance by typing
winrm create -?
Example: Create a windows shell command instance from xml:
winrm create shell/cmd -file:shell.xml -remote:srv.corp.com
However, I can't find proper documentation on how to form the mentioned shell.xml file as inputs to create a new shell. Some example options I want to use:
Shell instance parameters
OperationTimeout "PT9999S"
Locale "en-US"
InputStreams "stdin"
OutputStreams "stdout stderr"
Shell options
WINRS_NOPROFILE = FALSE
WINRS_CODEPAGE = 65001
I also managed to capture the TCP packet of WinRM protocol that can potentially derive the format for shell.xml
<?xml version="1.0" encoding="utf-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:b="http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd" xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:cfg="http://schemas.microsoft.com/wbem/wsman/1/config" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><env:Header><w:OperationTimeout>PT9999S</w:OperationTimeout><a:To>http://windows-host:5985/wsman</a:To><w:OptionSet><w:Option Name="WINRS_NOPROFILE">FALSE</w:Option><w:Option Name="WINRS_CODEPAGE">65001</w:Option></w:OptionSet><w:MaxEnvelopeSize mustUnderstand="true">153600</w:MaxEnvelopeSize><w:ResourceURI mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI><a:Action mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><p:DataLocale mustUnderstand="false" xml:lang="en-US"></p:DataLocale><a:ReplyTo><a:Address mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><a:MessageID>uuid:a9b8312c-2d01-4757-9ef2-9751ddaafd43</a:MessageID><w:Locale mustUnderstand="false" xml:lang="en-US"></w:Locale></env:Header><env:Body><rsp:Shell><rsp:InputStreams>stdin</rsp:InputStreams><rsp:OutputStreams>stdout stderr</rsp:OutputStreams></rsp:Shell></env:Body></env:Envelope>
Has someone done this before? Much appreciate any help. Thanks.
I am getting this error while doing Parse XML.
OSError: Error reading file 'CommandResponseError.xml': failed to load external entity "CommandResponseError.xml"
My Code ::
*** Settings ***
Documentation Suite description
Library XML
*** Variables ***
${InputPath} ${CURDIR}\\Input
${CommandResponseErrorXML} CommandResponseError.xml
*** Test Cases ***
Construct Error Code XML To PUSH
[Documentation] This KW is used to construct Error XML File
[Tags] XML read
${XMLNodes}= Parse XML ${CommandResponseErrorXML}
I am using XML Library to parse xml.
Here is the XML file.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header/>
<soap:Body>
<SendTOPMessages xmlns="http://schemas.turtletech.com/TS2/">
<messages>
<RFTOPCommand xmlns="http://schemas.turtletech.com/TS2/">
<MessageId>#MessageId</MessageId>
<ReceivedTime>1496632500</ReceivedTime>
<TOPAddress>#RFCollectorIdentifier</TOPAddress>
<LocalWANAddress>0</LocalWANAddress>
<LocalLANAddress>4278124157</LocalLANAddress>
<RemoteWANAddress>#RemoteWANAddress</RemoteWANAddress>
<RemoteLANAddress>#SerialNumber</RemoteLANAddress>
<Priority>1</Priority>
<TimeToLive>298</TimeToLive>
<Mood>0</Mood>
<ReturnReceipt>0</ReturnReceipt>
<MaxHops>252</MaxHops>
<MessageType>4</MessageType>
<MessagePayload>#Payload</MessagePayload>
</RFTOPCommand>
</messages>
</SendTOPMessages>
</soap:Body>
</soap:Envelope>
In your code example:
${XMLNodes}= Parse XML ${CommandResponseErrorXML}
your referring to ${CommandResponseErrorXML} which in turn refers to:
${CommandResponseErrorXML} CommandResponseError.xml.
This will work if the Robot file and CommandResponseError.xml are in the same folder. Change it to:
${InputPath} ${CURDIR}/Input
${CommandResponseErrorXML} ${InputPath}/CommandResponseError.xml
and you will add the InputPath to create the full path to the Root/Input/file.xml.
Note: the single forward slash works on both Unix and Windows. In my view it's preferred over and escaped backslash. Even if only for readability reasons.
I am trying to connect to Hive from R with the latest RHive package in HDP 2.4. The installation seemed to have gone smoothly, since I was able to call the library of RHive. When I execute
rhive.connect(host="192.168.56.101",port=10000, hiveServer2=TRUE)
I got this error message:
Cannot modify mapred.child.env at runtime. It is not in list of params that are allowed to be modified at runtime.
After some googling around, I added the following to the /etc/hive/conf/hive-site.xml file:
<property>
<name>hive.security.authorization.sqlstd.confwhitelist.append</name>
<value>mapred.child.env</value>
</property>
After restarting hive-server2, the original error message is now replaced by this one:
Cannot modify RHIVE_UDF_DIR at runtime. It is not in list of params
that are allowed to be modified at runtime.
I tried adding RHIVE_UDF_DIR right next to map.child.env, like this:
<property>
<name>hive.security.authorization.sqlstd.confwhitelist.append</name>
<value>mapred.child.env,RHIVE_UDF_DIR</value>
</property>
But this did not resolve the problem; it brought back the original error message that I was getting at the very beginning. Any thoughts on this? Thanks in advance!
I know this is late reply but I just came across this thread. Using java regex instead of comma separated would work. This worked for me this morning.
Config parameter should be added under hive-site.xml
hive.security.authorization.sqlstd.confwhitelist.append=mapred\.child\.env|RHIVE_UDF_DIR
Ps: Backslash was not displaying above so adding screenshot link.
config parameter with proper java regex for values
Can you please suggest why I am getting below error, when I am trying to upload my Assembly using TCMUploadAssembly.exe, below is the setting which I have done in my POST Build event.
$(ProjectDir)Dependencies\TcmUploadAssembly.exe $(ProjectDir)Dependencies\config.xml $(TargetPath) /folder:tcm:226-92873-2
And here is the error which I am getting:
Error 1 The command "C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\TridionTemplating\Tridion.BuildingBlocks\Dependencies\TcmUploadAssembly.exe C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\TridionTemplating\Tridion.BuildingBlocks\Dependencies\config.xml C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\TridionTemplating\Tridion.BuildingBlocks\bin\Debug\Tridion.BuildingBlocks.dll /folder:tcm:226-92873-2" exited with code 9009.
Thanks
I resolved my problem and now I am able to upload my assembly to my Tridion.
The problem was in my config.xml file, I was writing my password directly, due to that it was giving below error, my previous config format was like below which was giving error:
<?xml version="1.0"?>
<templateAssemblyUploadConfig>
<targetURL>http://machine</targetURL>
<userName>abc\xyz</userName>
<password>cdfd</password>
<uploadPDB>false</uploadPDB>
</templateAssemblyUploadConfig>
To resolve this problem, I run TcmUploadAssembly.exe from my Tridion\bin\client and it generated the below config file and the changes was only in password section
<?xml version="1.0"?>
<templateAssemblyUploadConfig>
<targetURL>http://machine</targetURL>
<userName>abc\xyz</userName>
<password>cdfd</password>
<uploadPDB>false</uploadPDB>
</templateAssemblyUploadConfig>
This resolved my problem thanks.
That could be anything. You could try to enter the full command in a cmd window to get more detail about the problem.
Manu - I hope that's not your real password you just posted here for the whole Internet to see!
In my case, if there are spaces in full path, then one needs quotation marks around the command. E.g.
"$(SolutionDir)SDLTridionUpload\TcmUploadAssembly.exe" "$(SolutionDir)SDLTridionUpload\Company.Tridion.Templating.UploadConfig.xml" "$(TargetPath)"
Password in the config file must be encrypted by TcmUploadAssembly. In command line prompt, enter the following command and press Enter, TcmUploadAssembly create the config file in the right way for you:
TCMUploadAssembly.exe Company.Tridion.Templating.UploadConfig.xml