Cordova至Android Studio错误格式错误的\ uxxxx编码 [英] Cordova to Android studio error malformed \uxxxx encoding

查看:93
本文介绍了Cordova至Android Studio错误格式错误的\ uxxxx编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将我的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆