android简单的UTF-8错误..不知道如何解决

时间:2012-03-30 06:28:03

标签: android eclipse logcat android-logcat

创建时遇到此错误: 解决方案在哪里改变我没有请指导我..

 -version-name
[2012-03-30 11:49:31 - Helloworld]        inserts android:versionName in to manifest.
[2012-03-30 11:49:31 - Helloworld]    --custom-package
[2012-03-30 11:49:31 - Helloworld]        generates R.java into a different package.
[2012-03-30 11:49:31 - Helloworld]    --auto-add-overlay
[2012-03-30 11:49:31 - Helloworld]        Automatically add resources that are only in overlays.
[2012-03-30 11:49:31 - Helloworld]    --rename-manifest-package
[2012-03-30 11:49:31 - Helloworld]        Rewrite the manifest so that its package name is the package name
[2012-03-30 11:49:31 - Helloworld]        given here.  Relative class names (for example .Foo) will be
[2012-03-30 11:49:31 - Helloworld]        changed to absolute names with the old package so that the code
[2012-03-30 11:49:31 - Helloworld]        does not need to change.
[2012-03-30 11:49:31 - Helloworld]    --rename-instrumentation-target-package
[2012-03-30 11:49:31 - Helloworld]        Rewrite the manifest so that all of its instrumentation
[2012-03-30 11:49:31 - Helloworld]        components target the given package.  Useful when used in
[2012-03-30 11:49:31 - Helloworld]        conjunction with --rename-manifest-package to fix tests against
[2012-03-30 11:49:31 - Helloworld]        a package that has been renamed.
[2012-03-30 11:49:31 - Helloworld]    --product
[2012-03-30 11:49:31 - Helloworld]        Specifies which variant to choose for strings that have
[2012-03-30 11:49:31 - Helloworld]        product variants
[2012-03-30 11:49:31 - Helloworld]    --utf16
[2012-03-30 11:49:31 - Helloworld]        changes default encoding for resources to UTF-16.  Only useful when API
[2012-03-30 11:49:31 - Helloworld]        level is set to 7 or higher where the default encoding is UTF-8.

3 个答案:

答案 0 :(得分:1)

我正面临这种错误。 请将您的程序运行到Android 2.3版。某事或以上...... 你不能再遇到这个错误了。

如果您收到其他错误,只需阅读最后两个 logcate utf-16即可。 请将你的logcat发布在这里,并发布错误..

更改它只是这样做:

project -> right click -> properties ->Android ->default 2.2 is selected in your case.
or any low version.

选择了android 2.3。或以上,再次运行程序。

答案 1 :(得分:0)

不知道确切地说这会产生问题,但你可以尝试一下。

  

在eclipse中转到Project - >右键单击 - >属性 - >资源 - >   在文本文件编码下 - 选择其他 - >从Drop-中选择UTF -16   向下 - >申请并确认

建立并清理项目。

答案 2 :(得分:0)

我无法验证文档,因为在第142行它包含一个或多个不能解释为utf-8的字节(换句话说,找到的字节在指定的字符编码中不是有效值)。请检查文件内容和字符编码指示。

错误是:

  

utf8“\ xA9”未映射到Unicode

要解决此问题,请删除©等字符以及任何中文字符。