【发布时间】:2012-03-10 03:11:06
【问题描述】:
我正在开发 Android SDK-NDK,但遇到以下代码问题:
case ColorArray:
List<Color> lIdList = stringToList
( new Function<String, Color>()
{
public Color apply(String pSubValue)
{ return new Color(pSubValue);
}
},
lValue
);
break;
这是 Eclipse IDE 在 FC16 上给出的消息:
The method stringToList(new Function<String,Color>(){}, String) is undefined for the type StoreActivity
为了解决这个问题,我已经包括:
import com.google.common.base.Function;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import com.google.common.primitives.Ints;
import java.util.ArrayList;
import java.util.List;
我还在项目 > 属性 > Java 构建路径 > 库中添加了“guava-11.0.1.jar”。
但问题并没有消失。
非常感谢所有 cmets 和建议。
【问题讨论】:
标签: android string list undefined guava