gpt4 book ai didi

java - 安卓编译器: Cannot resolve symbol string

转载 作者:太空狗 更新时间:2023-10-29 15:34:09 24 4
gpt4 key购买 nike

当我尝试将 strServerIP 添加到类服务器时,我得到:
无法解析符号字符串
编译器错误。

为什么?

package com.example;


public class Server
{
//public static java.lang.string SERVERIP;
public static android.R.string SERVERIP;
public static java.lang.string strServerIP = "monster.idsoftware.com";
public static string strServerIP = "monster.idsoftware.com";
public static int SERVERPORT = 27950;
public static int PROTOCOL = 68;
}

最佳答案

使用“字符串”而不是“字符串”

关于java - 安卓编译器: Cannot resolve symbol string,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2093439/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com