1
我使用google示例教程創建了這個geofencing應用程序。一切運作良好,除了這部分,其不斷顯示錯誤:Android geofencing的問題
在SimpleGeofence.java,我有:
public class SimpleGeofence{
...
public Geofence toGeofence() {
// Build a new Geofence object
return new Geofence.Builder()
.setRequestId(getId())
.setTransitionTypes(mTransitionType)
.setCircularRegion(
getLatitude(),
getLongitude(),
getRadius())
.setExpirationDuration(mExpirationDuration)
.build();
}
下Geofence.Builder()錯誤顯示,和我被要求創建類型爲'Geofence'的'Builder'類。
當我Geofence.java下創建類,將問題轉移到.setRequestId(的getId()),我要求創建一個方法「setRequestId(字符串)」的類型「生成器」 。這是我創建所有這些後在Geofence.java中所擁有的;現在
package com.kamerlabs.wocmantv;
public class Geofence {
public class Builder {
public Object setRequestId(String string) {
// TODO Auto-generated method stub
return null;
}
}
}
錯誤顯示了.setTransitionTypes(mTransitionType),我問'鑄加入方法接收機'。這是我需要幫助的地方。我現在該怎麼做。提前致謝!!