我正在尝试在android studio中构建我的项目,它始终工作正常,但今天它给了我以下错误:
Error:(39, 2) Execution failed for task ':app:mergeDebugResources'.
> ...........................\app\src\main\res\values\strings.xml:39:2: Error:
The type of "string" element must be terminated by the matching end-tag "</ string>".
这是完整的XML文件:
<string name="app_name">CDU</string>
<string name="contact_email" translatable="false">test@ysrsd.com/string>
<string name="gcm_key">000000000</string>
<string name="map_key" translatable="false">000000000</string>
<string name="euro">€</string>
<string name="action_settings">Settings</string>
<string name="gallery">Gallery</string>
<string name="about_us">About us</string>
<string name="address_restaurant">Address</string>
<string name="error_msg">Connection can\'t be established</string>
<string name="about_restaurant">About CDU/string>
<string name="opening_time">Opening Times</string>
<string name="call_restaurant">Call us for enquiry</string>
<string name="send_message">Send message to us</string>
<string name="no_notifications">We don\'t have any notifications yet.</string>
<string name="how_to_get_there">How to get there</string>
<string name="start_navigation">Start navigation to the center</string>
<string name="locate_us">Locate Us</string>
<string name="last_notification">Last Notification</string>
<string name="crash_toast_text">App stopped working. Please help us fix this by sending us error data.</string>
<string name="contact_us">Contact Us</string>
<string name="name">Your name</string>
<string name="contact">Your contact number</string>
<string name="email">Your email address</string>
<string name="message">Tell us about your concern</string>
<string name="name_contact_validation">Name and contact number are necessary</string>
<string name="email_validation">Email address is not valid</string>
<string name="email_feedback">Feedback</string>
<string name="no_internet">No Network!</string>
<string name="no_internet_msg">Please make sure that you are connected to internet</string>
<string name="not_able_to_connect">We\'re facing problem connecting to server, please retry</string>
<string name="website">Reservas</string>
<string name="website_url" translatable="false">http://www.google.es</string>
有人可以帮我解决这个问题,谢谢。
答案 0 :(得分:2)
您的第二行和第11行目前缺少正确的结束标记(缺少&#34;&lt;&#34;)
<string name="contact_email" translatable="false">test@ysrsd.com/string>
...
<string name="about_restaurant">About CDU/string>
将其更改为以下内容:
<string name="contact_email" translatable="false">test@ysrsd.com</string>
...
<string name="about_restaurant">About CDU</string>
答案 1 :(得分:-1)
尝试使用:
<string name="website_url" translatable="false">"http://www.google.es"</string>