[英]Importing Android WifiManager to Eclipse
I am new to Eclipse and I am trying to find out why: 我是Eclipse的新手,我试图找出原因:
import android.net.wifi.WifiManager;
is not recognized. 无法识别。 What do I need to import in Eclipse?
我需要在Eclipse中导入什么? The following is what I have written so far:
以下是我到目前为止编写的内容:
package com.my.android.wifi;
import org.python.core.PyInteger;
import org.python.core.PyObject;
import org.python.core.PyString;
import org.python.util.PythonInterpreter;
import com.android.monkeyrunner.MonkeyDevice;
import com.google.common.base.Predicate;
import android.net.wifi.WifiManager;
public class MonkeyWifi implements Predicate<PythonInterpreter> {
public boolean CheckWifi (MonkeyDevice device){
device.isWifiEnabled();
}
@Override
public boolean apply(PythonInterpreter arg0) {
return false;
}
}
The problem got resolved after adding an additional library in the Eclipse project: 在Eclipse项目中添加其他库后,问题得到解决:
---> ADD External JARs
pick: 挑:
sdk/platforms/android-xx/android.jar
now all Android API's are recognized. 现在所有的Android API都可以识别了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.