[英]Cordova to Android studio error malformed \uxxxx encoding
I want to import my Cordova project to Android Studio. 我想将Cordova项目导入Android Studio。 But when on
Grandle Sync
, this error is shown - 但是在
Grandle Sync
上显示此错误时-
malformed \uxxxx encoding
The error part is: 错误部分是:
def addSigningProps(propsFilePath, signingConfig) {
def propsFile = file(propsFilePath)
def props = new Properties()
propsFile.withReader { reader ->
props.load(reader) //this line is the error (line 290)
}
The entire Gradle file is available here: https://pastebin.com/66vVKHzG 完整的Gradle文件可在此处获取: https : //pastebin.com/66vVKHzG
How to solve this ? 如何解决呢?
The error is caused in android build when we use \\usr\\<blah>
ie a \\
(backslash) instead of /
(forward slash) in directory structure. 当我们在目录结构中使用
\\usr\\<blah>
即\\
(反斜杠)而不是/
(正斜杠)时,该错误是在android build中引起的。 The parser will see it as an escape character!! 解析器会将其视为转义字符!!
I still don't know from where that \\
is getting used from your Cordova Project. 我仍然不知道您的Cordova项目从哪里使用
\\
。 You need to figure that out based on what functionalities you are doing and where you are using file system. 您需要根据正在执行的功能以及在何处使用文件系统来弄清楚。
According to your code propsFilePath
might be having a \\
which is causing this error. 根据您的代码,
propsFilePath
可能带有\\
,这会导致此错误。
Reference - https://coderanch.com/t/107014/Malformed-uxxxx-encoding-error 参考-https: //coderanch.com/t/107014/Malformed-uxxxx-encoding-error
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.