Cordova至Android Studio错误格式错误的\ uxxxx编码 [英] Cordova to Android studio error malformed \uxxxx encoding
问题描述
我想将我的Cordova项目导入Android Studio.但是在 Grandle同步
上显示此错误-
I want to import my Cordova project to Android Studio.
But when on Grandle Sync
, this error is shown -
malformed \uxxxx encoding
错误部分是:
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)
}
此处提供了整个Gradle文件: https://pastebin.com/66vVKHzG
The entire Gradle file is available here: https://pastebin.com/66vVKHzG
如何解决这个问题?
推荐答案
当我们使用 \ usr \< blah>
即 \
(反斜杠)而不是目录结构中的/
(正斜杠).解析器会将其视为转义字符!
The error is caused in android build when we use \usr\<blah>
i.e a \
(backslash) instead of /
(forward slash) in directory structure. The parser will see it as an escape character!!
我仍然不知道您的Cordova项目从何处使用 \
.您需要根据正在执行的功能以及在何处使用文件系统来弄清这一点.
I still don't know from where that \
is getting used from your Cordova Project. You need to figure that out based on what functionalities you are doing and where you are using file system.
根据您的代码 propsFilePath
可能有一个 \
导致此错误.
According to your code propsFilePath
might be having a \
which is causing this error.
参考- https://coderanch.com/t/107014/格式错误-uxxxx-encoding-error
这篇关于Cordova至Android Studio错误格式错误的\ uxxxx编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!