我想在两个纬度经度之间绘制路径.这是我的MapsActivity.java.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment)
getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
find = (Button) findViewById(R.id.btnFindPath);
or = (EditText) findViewById(R.id.etOrigin);
dest = (EditText) findViewById(R.id.etDestination);
find.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
sendRequest();
}
});
}
public void sendRequest(){
String origin = or.getText().toString();
String destination = dest.getText().toString();
if(origin.isEmpty()){
Toast.makeText(this,"Please Enter the Origin" , Toast.LENGTH_SHORT).show();
}
if(destination.isEmpty()){
Toast.makeText(this,"Please Enter the Destination" , …Run Code Online (Sandbox Code Playgroud) 我是 nubie 编程 android 并且我知道在这里有很多页面讨论我的问题的解决方案,但现在我失去了 2 天仍然没有得到解决方案。请帮我!
首先是我的错误:
01-02 11:08:27.314: D/AndroidRuntime(1045): Shutting down VM
01-02 11:08:27.314: W/dalvikvm(1045): threadid=1: thread exiting with uncaught exception (group=0x409e61f8)
01-02 11:08:27.324: E/AndroidRuntime(1045): FATAL EXCEPTION: main
01-02 11:08:27.324: E/AndroidRuntime(1045): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.wifiscan/com.example.wifiscan.activity_wifi_scan}: java.lang.ClassNotFoundException: com.example.wifiscan.activity_wifi_scan
01-02 11:08:27.324: E/AndroidRuntime(1045): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
01-02 11:08:27.324: E/AndroidRuntime(1045): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
01-02 11:08:27.324: E/AndroidRuntime(1045): at android.app.ActivityThread.access$600(ActivityThread.java:123)
01-02 11:08:27.324: E/AndroidRuntime(1045): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
01-02 11:08:27.324: E/AndroidRuntime(1045): at android.os.Handler.dispatchMessage(Handler.java:99)
01-02 11:08:27.324: E/AndroidRuntime(1045): at android.os.Looper.loop(Looper.java:137)
01-02 11:08:27.324: E/AndroidRuntime(1045): at android.app.ActivityThread.main(ActivityThread.java:4424)
01-02 11:08:27.324: E/AndroidRuntime(1045): at …Run Code Online (Sandbox Code Playgroud)