gpt4 book ai didi

java - 全新的应用程序在 R.java 中抛出 "Syntax error, insert "}"to complete ClassBody"

转载 作者:行者123 更新时间:2023-11-29 09:31:59 27 4
gpt4 key购买 nike

我刚刚在 Eclipse 中创建了一个新项目,R.java 在最后一个分号上显示“语法错误,插入“}”以完成 ClassBody”。

我仔细检查了我所有的 XML 文件是否有错误、失误、拼写错误和空参数,但均无济于事。

这是抛出错误的 R.java 中最后几行代码。

            public static final int View_android_focusable = 0;
/**
<p>
@attr description
Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.


<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.reignofgodsplayer:paddingEnd
*/
public static final int View_paddingEnd = 2;
/**
<p>
@attr description
Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.


<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.reignofgodsplayer:paddingStart
*/
public static final int View_paddingStart = 1;
};

最佳答案

当我在 project.properties 文件中将“target=android-20”更改为“target=android-23”时,遇到了与您相同的问题。如果我恢复它。没有问题。所以你需要尝试修改“target=android-20”project.properties文件,也许是个好方法。

关于java - 全新的应用程序在 R.java 中抛出 "Syntax error, insert "}"to complete ClassBody",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30026582/

27 4 0