mac电脑,android开发,其中有一段java代码是这样的:
……
String html = (一段html文本,很长)
……
我想着把这段html保存到文件中,然后读取这个文件来获取这段文本内容,
开始的时候,iflow先读取了这段html文本,然后创建了一个html文件,然后生成了一段java代码读取文件,到这里都正常,然后将读取文件的这段代码替换原来代码中的这一长串html文本,噩梦开始了,
一直显示:
Failed to edit, 0 occurrences found for old_string in /xxxxx/xxxxx.java. No edits made. The exact text in old_string was not found. Ensure you’re not escaping content │
│ incorrectly and check whitespace, indentation, and context. Use read_file tool to verify.
然后反复各种尝试,但是都是返回这个错误,到发帖时已经执行了40多分钟了,一直在循环报这个错误。
我很纳闷,写文件时读取这段文本很顺利,那时候是怎么匹配到的,正则?or someting else,不管用什么方法,替换的时候用同样的方法不能直接匹配到然后替换掉吗