question

StephenRowell-3151 avatar image
0 Votes"
StephenRowell-3151 asked DuncanLawler-3885 answered

Bing Maps - NonExistentClass it -> Android studio

Still having issues working with Bing Maps. I have followed the implementation instructions ( see previous questions ) but still getting same error msg. This being that the java file the line "mMapView.setCredentialsKey(BuildConfig.CREDENTIALS_KEY);" shows the CREDENTIALS_KEY as redand error msg "cannot resolve symbol 'CREDENTIALS_KEY'"

Also in the build.gradle

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
buildTypes.each {NonExistentClass it ->
it.buildConfigField "String", "CREDENTIALS_KEY", "\"$credentialsKey\""
}


I can find no reference to the--- NonExistentClass -> and what to do to remove if this is part of the root cause of the issue with "cannot resolve symbol 'CREDENTIALS_KEY'"


I followed the instructions at
https://docs.microsoft.com/en-us/bingmaps/sdk-native/getting-started-android/

Any help welcomed.

windows-maps
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Change the Tag : not related to windows-app-sdk


0 Votes 0 ·

1 Answer

DuncanLawler-3885 avatar image
0 Votes"
DuncanLawler-3885 answered

It looks like you still have some placeholder code instead of your actual class name in the gradle file.
The steps in the getting started show how to reference your app key without compiling it into your code. You can just insert it directly into your app code, but this is not recommended.
If you need an additional example, check the sample in the github here:
https://github.com/microsoft/MapsSDK-Native/tree/master/Android/samples/sdksample
It shows how to set up the gradle file correctly.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.