Script fails at splash screen of app!

Hello,

I am facing this weird issue ,when ever I am trying to run the script to automate android app, the app launches and the appium script fails at the splash screen,it doesnt even show the main menu of app .I am using this script to tap on the home button in side menu bar in main menu of screen once the app crosses splash screen but unfortunately script fails at splash screen, Is there any way that I can bypass the splash screen and able to locate element in main menu of app.
Please some on guide me if I am missing something,

Here is my Eclipse script:

package androidApp;

import java.net.MalformedURLException;
import java.net.URL;
import java.sql.Driver;
import java.util.concurrent.TimeUnit;

import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.ui.WebDriverWait;

import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.MobileCapabilityType;

public class oneTicket {

AndroidDriver driver;

@Before

public void setup() throws MalformedURLException, InterruptedException 

{
	DesiredCapabilities cap = new DesiredCapabilities();

	
	cap.setCapability("app", "/Users/dianahoward/Downloads/xyz.apk");
	cap.setCapability("appium-version", "1.0");
	cap.setCapability("platformName", "android");
	//cap.setCapability("platformVersion", "6.0.1");
	cap.setCapability("deviceName", "Android Emulator");
	cap.setCapability("platformVersion", "4.4.2");
	//cap.setCapability("deviceName", "Nexus 6P");
	cap.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, "50000");
	AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),cap);
	driver.manage().timeouts().implicitlyWait(5000, TimeUnit.SECONDS);
	
	Thread.sleep(3000);
	 
}

@Test
public void test() throws InterruptedException
{

try
{
	driver.findElement(By.id("packagename:id/splashScreenLogo"));

  
}
catch (Exception e)
{
	
}

driver.findElement(by.id(“packagename:id/design_menu_item_text”)).click(); //This is a script for tapping on the home button on the side menu bar in main menu screen which comes after splash screen
}

appium is not giving ny error instead it shows 'Responding to client with success.
Eclipse console shows only this small line of error “Java.lang.NullpointerExceptio”

you need to post logs of Appium and Eclipse

However NullPointer comes only when the time you are running your script and your script is trying to perform the action like click,sendkeys on a element which is currently not visible on page

Add some wait (enough for loading your page) before performing such action

else attach logs here for eclipse as well as of Appium

findElement() does not return null if it does not find an element. Instead, it will throw a NoSuchElementException.