CREDENTIALS_KEY, Android studio when trying to useBing maps get cannot resolve symbol 'CREDENTIALS_KEY'

Stephen Rowell 1 Reputation point
2022-04-20T02:52:59.973+00:00

First time to try and use Bing Maps in Android app, following the instructions at : - https://learn.microsoft.com/en-us/bingmaps/sdk-native/getting-started-android/

I get an error message with the following code:-

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

    mMapView = new MapView(this, MapRenderMode.VECTOR);    
    mMapView.setCredentialsKey(BuildConfig.CREDENTIALS_KEY);  
    ((FrameLayout)findViewById(R.id.map_view)).addView(mMapView);  
    mMapView.onCreate(savedInstanceState);  

    mMapView.onCreate(savedInstanceState);  

}  

The CREDENTIALS_KEY is red and error message of cannot resolve 'CREDENTIALS_KEY', tried searching the web but unable to find any clueas to what I have missed got wrong. Can anyone here help?

Windows for home Windows 11 Apps
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.