Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio cannot resolve mapActivity

I am trying to input source code from codly.io which enables me to convert PSD designs into java source.

However, once imported and after fixing issues with appcompact and google play service, I get an error saying it cannot resolve MapActivity.

or during the super.onCreate it cannot resolve the method.

public class Login extends MapActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.view_login);
    initView();
}

private void initView(){



    //TODO add extra view initialization code here
}


@Override
protected boolean isRouteDisplayed() {
    return false;
}


public void onLoginClicked(View v){
    Intent intent = new Intent(this, DriverSelect.class);
    startActivity(intent);
}

public void onBpClicked(View v){
    this.finish();
}

}
like image 655
user3292645 Avatar asked Dec 29 '25 02:12

user3292645


1 Answers

it cannot resolve MapActivity

MapActivity is from the old, defunct MapsV1 way of integrating Google Maps. Since you cannot get API keys for MapsV1 anymore, you will need to modify your code to use MapsV2.

This also does not speak well for that service, as to how much they are paying attention to their Android code generation, given that MapsV1 was deprecated 1.5 years ago.

like image 110
CommonsWare Avatar answered Dec 30 '25 16:12

CommonsWare



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!