Category: Android
-
Android Studio generate foreach loop
Begin typing foreach until autocomplete pops up. Select “Create a for each loop”. You’ll then get an empty for each loop that you can start filling in, first supplying the Type of each object, a variable name of your choice for that object, then hit Enter to move to the name of the variable (a…
-
Pause genymotion Android Emulator on Mac
To Pause genymotion Android Emulator on Mac: Press the power button of emulator (bottom right corner) This is equivalent to executing “avd stop” within adb shell on the emulator Find the process ID number of VBoxHeadless using Activity Monitor In Terminal: kill -STOP <ID number from step 2> Your emulator is now effectively paused and uses no…
-
Android Studio androidTest sourceSets gradle not recognized
Android Studio (app) build.gradle sourceSets androidTest java.srcDir property may not be recognized when using the array format of this source directory property setting. BAD sourceSets { androidTest { java.srcDirs = [‘androidTest/java’] } } GOOD sourceSets { androidTest { java.srcDir file(‘androidTest/java’) } } For setting up Robotium UI / Integration testing, it’s important that your androidTest source directory…