From Android Studio, I created a Map Activity project; so, there's no custom code.
The only custom changes made was copying the URL from the google_maps_api.xml _(https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=)_ and using it to create an API key.
Android Studio: 3.0.1 Emulator: Nexus 5X with API 25
apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 26 defaultConfig { applicationId "xxxx.xxx.xxxx" minSdkVersion 19 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.google.android.gms:play-services-maps:11.0.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' }
It seems like I'm missing something; I just don't know what it is.
Run your app on the emulator After you have created an Android Virtual Device (AVD), you can start the Android Emulator and run an app in your project: In the toolbar, select the AVD that you want to run your app on from the target device drop-down menu. Click Run.
First, run your Android Emulator and click on the three dots on the menus beside. On the left pane, select Location and change the coordinates according to your location. Press the Send button, changes will immediately take effect.
Type "cd\" (to move to the main directory). Now type "telnet localhost 5554" (leaving the quotes and the number is the same as present on top of your emulator). Now type : window scale 0. x (x as per your requirement eg: window scale 0.5 to get the half screen size).
Alt+Enter is the keyboard shortcut to toggle full screen mode in the emulator, just do it again to exit full screen.
Try to run in your mobile. Sometimes emulator is not able to load map properly, That's why it shows blank map without loading roots.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With