修改我的 strings.xml 文件后,突然间我得到 80+ R 无法解析为变量错误。我不确定我到底做了什么导致这个问题,但是我以某种方式破坏了我的项目,当我检查我的工作区所在的网络驱动器时 - 字符串文件在那里,我可以在 eclipse 中打开它并查看假设“缺少字符串”但是 eclipse 状态:No resource found that matches the given name
不管字符串实际上在那里。
采取的步骤:
清理项目
检查 strings.xml 是否有异常(未找到)
重启 Eclipse
字符串.XML
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Welcome to <b>Straight Talk Wireless!</b></string>
<string name="app_name">Straight Talk Data Settings</string>
<string name="display_name">Data Settings</string>
<string name="initial_sm_dialog">The APN Settings on your phone will now be updated to the Straight Talk Wireless Network so you can use DATA and PICTURE MESSAGING.</string>
<string name="unchanged_sm_dialog">The APN Settings have not been updated to the <b>Straight Talk Mobile Network</b></string>
<string name="changed_sm_dialog">The APN Settings have been updated to the <b>Straight Talk Mobile Network</b></string>
<string name="insert_sm_dialog">Error: \r\nPlease insert a Straight Talk SIM into an unlocked GSM phone and re-run the app.</string>
<string name="incomp_sm_dialog">Error: Incompatible device.\r\nPlease use an unlocked GSM phone with a Straight Talk SIM.</string>
<string name="security_sm_dialog">Please manually enter the Straight Talk APN Settings on your device with the below information:\r\nName:\straighttalk\r\nAPN:\straight talk\r\nMMSC:\thttp://smpl.mms.msg.eng.t-mobile.com/mms/wapenc\r\nMCC:\t310\r\nMNC:\t260</string>
<string name="security_instr">It looks like you’re running an Android OS Ice Cream Sandwich or later.
\r\nNo worries, please follow the below steps:
\r\n1. Write down these settings: </string>
<string name="under_settings">2. Click the button below that says “Take me to Update my Settings”
\r\n3. Click the menu button that you’ll see on the next screen
\r\n4. Click “New APN” and enter the fields you just wrote down</string>
<string name="security_sm_dialog_t">Please manually enter the Straight Talk APN Settings on your device.\r\n<table><tr><td>Name:</td><td>Straight Talk</td></tr><tr><td>APN:</td><td>straighttalk</td></tr><tr><td>MMSC:</td><td>thttp://smpl.mms.msg.eng.t-mobile.com/mms/wapenc</td></tr></table></string>
<string name="assited_title">Assisted Data Settings</string>
<string name="assited_steps">1. Create a new data profile by selecting Menu>New APN.
\n\n2. Select the Straight Talk notification and paste the value in the corresponding field in the new data profile.
\n\n3. Continue doing so until there are no more Straight Talk Mobile notifications.
\n\n4. Save the new profile and exit.
\n\n5. Select the Straight Talk profile as default and you are DONE.</string>
<string name="assisted_button">Create new data profile</string>
<string name="finish_alert_title">Almost Complete</string>
<string name="complete_steps">1. Press Menu>Save
\n\n2. Select the Straight Talk profile as default and you are DONE.</string>
<string name="update_text">By choosing to update, the APN settings on your cell phone will be automatically updated and you will be able to access data on the Straight Talk Network.\n\n\n\n</string>
<string name="updating_text">Loading APN settings...\n\n\n\n</string>
<string name="error_text">We couldn’t retrieve your settings. Please try again later. You might get better results in about an hour.\n\n\n\n</string>
<string name="visit_text">If that doesn’t work, please visit</string>
<string name="oops_text">Oops!</string>
<string name="updated_text">Your settings are updated. Just reboot your phone. If this doesn’t work, go to http://apn.straighttalk.com to find specific instructions for your handset.</string>
<string name="updated_text2">Your settings are updated.</string>
<string name="tryagain_text1"><font color="#29abf2">Oops!</font></string>
<string name="tryagain_text2"> <font color="#00000">We couldn\'t retrieve your settings. Please try again later.You might get better results in about an hour.</font </string>
<string name="tryagain_text3"><font color="#00000">If that doesn\'t work, please visit</font> <font color="#29abf2"><b>
<string name="url_text">http://apn.straighttalk.com</string>
<string name="start_text">Easily set up your Data Settings with this APN mobile app.</string>
<string name="start_text2">Easily set up your Data Settings\n with this APN mobile app.</string>
<string name="done_text">Reboot your phone and you’ll have access to the web and picture messaging.</string>
<string name="apn_app_text_cta2">You’re going to need to edit a few of your phone’s settings. Enhanced security on newer versions of Android will not allow APN settings to be automatically updated. Don’t worry; we will walk you through step by step.</string>
<string name="apn_app_text_instr">We will send you a series of (%1$s) <font color="#FF000000"><b>NOTIFICATIONS</b></font> to your cell phone. You need to complete each step in order to update your settings.<br><br>Please take a moment to read each of the following instructions. Once you’re finished reading the instructions click the Let’s Get Started button to begin receiving the notifications</string><string name="apn_app_text_instr2">1. You will need to add a <font color="#FF000000"><b>NEW APN PROFILE</b></font> before you start with the notifications. If you need instructions on how to do this, please refer to your device’s user or manufacture’s manual. <br><br>2. <font color="#FF000000"><b>PULL DOWN</b></font> the notification screen. Once you have done this the information that needs to be updated will be copied to your clipboard. <br><br>3. You must then <font color="#FF000000"><b>TAP AND HOLD</b></font> the field presented to you. <font color="#FF000000"><b>RELEASE,</b></font> and the copied information will be pasted into the field. <br><br>4. <font color="#FF000000"><b>PULL DOWN</b></font> the the notication screen. Once you have done this, the information that needs to be updated will be copied to your clipboard.<br></string><string name="apn_app_text_instr3">5. Complete the series of (%1$s) notification steps. <br><br>6. <font color="#FF000000"><b>SAVE</b></font> the new profile and exit. <br><br>7. <font color="#FF000000"><b>SELECT</b></font> the Straight Talk APN profile as default. <br><br>8. Be sure you <font color="#FF000000"><b>DELETE</b></font> all other APNs, if possible.</string>
<string name="delete_notif_title">(Delete other APNs)</string>
<string name="delete_notif_content">SELECT them, Press \"menu\" and delete them if your phone allows it.</string>
<string name="reboot_notif_title">(Reboot your Phone)</string>
<string name="reboot_notif_content">If this doesn\'t work, go to:\nwww.straighttalk.com/support</string>
<string name="read_again_text"><b><u>READ INSTRUCTIONS AGAIN</u></b></string>
<string name="mcc_label">MCC</string>
<string name="mcc">310</string>
<string name="type_label">APN Type</string>
<string name="type">default,mms,supl</string>
<string name="config_name_label">Name</string>
<string name="config_sm_name">Straight Talk Wireless</string>
<string name="apn_label">APN</string>
<string name="apn_sm_addr">straighttalk</string>
<string name="mmsc_label">MMSC</string>
<string name="mmsc_sm_url">http://smpl.mms.msg.eng.t-mobile.com/mms/wapenc</string>
<string name="mnc_label">MNC</string>
<string name="mnc_tmo">260</string>
<string name="mnc_att">410</string>
<string name="numeric_tmo">310260</string>
<string name="proxy_sm_addr"></string>
<string name="proxy_sm_port"></string>
<string name="mmsproxy_sm"></string>
<string name="mmsport_sm"></string>
<string name="authtype"></string>
<string name="user"></string>
<string name="password"></string>
<string name="server"></string>
<string name="protocol"></string>
<string name="authtype_sm">0</string>
<string name="numeric_att">310410</string>
<string name="instructions_1">TEST STRING</string>
<string name="done_text1">TEST STRING2</string></string>
</resources>