简体   繁体   English

Cordova至Android Studio错误格式错误的\\ uxxxx编码

[英]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.

相关问题 加载Java xlsx文件的属性时出错。 [错误] \\ uxxxx编码格式错误 - Error loading properties of Java xlsx files. [ERROR] Malformed \uxxxx encoding org.apache.maven.InternalErrorException:内部错误:java.lang.IllegalArgumentException:MAC格式错误的\ uxxxx编码 - org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalArgumentException: Malformed \uxxxx encoding for MAC SpringBoot1.5 application.properties格式错误的\\ uxxxx编码 - SpringBoot1.5 application.properties Malformed \uxxxx encoding java.lang.IllegalArgumentException:mvn 安装时格式错误的 \uxxxx 编码 - java.lang.IllegalArgumentException: Malformed \uxxxx encoding while mvn install 错误运行应用程序格式错误的编码本机 android - error running app malformed encoding native android android studio 中的 INSTALL_PARSE_MANIFEST_MALFORMED 错误 - INSTALL_PARSE_MANIFEST_MALFORMED error in android studio Visual Studio - Cordova Android“transformClassesWithDexForDebug”错误 - Visual Studio - Cordova Android “transformClassesWithDexForDebug” error Android SAXParser格式错误的XMl错误 - Android SAXParser Malformed XMl error 带有Cordova CLI的Android Studio - Android Studio with Cordova CLI 离子 4、Android Studio、Gradle、Java jdk 或 ZD2DFF3F05FF8C6369CBDE9A642CE 错误 - Ionic 4, Android Studio, Gradle, Java jdk or Cordova error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM