こんにちは皆私は緯度と経度で教えてくれるアプリを作っています。Android Appの場所
私はまさにこの一方(https://developer.android.com/guide/topics/location/strategies.html#BestPerformance)が、最後の行
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);
を赤色下線が引かれました。
私は "import android.location。*;"を使用します。私がデバッグを行うときには、その呼び出しにステップインします。 問題がLocationManager.javaにこれらの間違った「輸入品」があるということです。
import com.android.internal.location.ProviderProperties;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.TestApi;
は、誰かが私を助けることができますか?これら
輸入android.location.Locationを追加
私はすでに私がandroid.locationをインポートし、それを試してみてください。*; – Andrea