Appium not working

I am new to Appium , installed appium and when starting appium it shows appium server has stopped .

The server is not able to start can you please help here .installed version 1.8.0.

Need urgent help

Please share more details. Are you launching the appium desktop before running your method? what are the desired capabilities you have set? Try to run the below sample code and share the log if it did not run.

public static void androidDevice()throws MalformedURLException {
DesiredCapabilities capabilities = new DesiredCapabilities();

    capabilities.setCapability("deviceName", "xxxxxxxxx"); //ID of the device connected locally
    capabilities.setCapability("platformName", "xxxx"); // iOS or Android
    capabilities.setCapability("app", "/Users/xxx/xxx/app.apk"); //Local Path of the .apk file
    wd = new AndroidDriver(new URL(""), capabilities); // Appium local Server
    wd.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);

Can u explain in detail or you may follow with the guide lines provided for installation procedures.