Using IntelliJ/Android Studio

×

Add Database Support wiht Intellij

Opening the Database tool window and add Database and JDBC Connector

  • Note: You may need to download a JDBC Connector if needed
Select View | Tool Windows | Database
Image intellij_usage_img1.jpg  NOT Found

IntelliJ Shortcuts

Shortcut Shortcut Action
Ctrl+Q Show JAVAdoc Entry
Ctrl+Shift+F Find a piece of text in all files with the specified path
Ctrl+Shift+N Find a File / Class
Ctrl+Shift+S IntelliJ Setup Menu
Alt+F7 Code Usage in All Places

Error starting JEE7 Webserver – port XXXX already in Use

  • Error Message: 10:51 Error running ‘payara’: Address localhost:8080 is already in use

Windows Solution

Locate Process/Service ID already listening on port 8080 by using netstat

D:\dev\myProjects>netstat -ano | find "8080"
  TCP    0.0.0.0:8080           0.0.0.0:0              ABHÖREN         1232

Use Windows Task Manager to get Details for Process/Service with ID=1232

  • Check both: Processes and Services

Verify your Windows OS Environment and kill/stop Process/Service

Locate Process/Service with PID=1232 Stop Process/Service with PID=1233
Image intellij_portnumber_img1.jpg  NOT Found Image intellij_portnumber_img2.jpg  NOT Found

Reference

Slow Debugging with Intellij
  • After removing all Breakpoints the Debugger Start reduces from 240 seconds to 15 seconds

Reference

Mavenize a project using Intellij?

  • Right Click on Project -> Add Framework Support -> Select Maven

Reference

Tracing Network Traffic

Using Wireshark

  • Start the emulator with -tcpdump parameter
c:\Users\helmu\AppData\Local\Android\Sdk\emulator>  emulator -tcpdump tcp.dmp -avd Nexus_6P_API_22
emulator: WARNING: encryption is off
HAX is working and emulator runs in fast virt mode.
audio: Failed to create voice `goldfish_audio_in'
qemu-system-i386.exe: warning: opening audio input failed
audio: Failed to create voice `adc'
audio: Failed to create voice `adc'
emulator: Saving state on exit with session uptime 16976 ms
qemu-system-i386.exe: Unable to open C:\Users\helmu\.android\avd\Nexus_6P_API_22.avd\data\misc\pstore\pstore.bin: Permission denied
  • Run your Http Request
  • Load dump File into Wireshark to display the Network Traffic

Picture tdb Intellj_Network_img1.jpg

Using Fiddler

  • Start Fiddler
  • Start the emulator with -http-proxy parameter
 
Start the emulator with  -http-proxy parameter 
c:\Users\helmu\AppData\Local\Android\Sdk\emulator>  emulator -http-proxy 127.0.0.1:8888 -avd Nexus_6P_API_22 -http-proxy
emulator: WARNING: encryption is off
HAX is working and emulator runs in fast virt mode.
audio: Failed to create voice `goldfish_audio_in'
qemu-system-i386.exe: warning: opening audio input failed
audio: Failed to create voice `adc'
audio: Failed to create voice `adc'

Status Fiddler traces the initial HTTP Request but fails to finish the HTTP transfer

NOTE: Tracing does NOT Work yet – Needs further investigations

#	Result	Protocol  Host	     URL	        Body  Caching	Content-Type Process	Comments	Custom	
342	200	HTTP	  Tunnel to  127.0.0.1:8080	0			     qemu-system-i386:13804		

Reference

Android Studio incompatible with HYPER-V Feature used by Docker on Windows 10

Adding Undo / Redo Typing Button to Main Toolbar