I am using this code and not able to start app to my mobile device
package Mobileapp1;
.
.
import io.appium.java_client.remote.MobileCapabilityType;
public class Apptesting
{
public static void main(String[] args) throws MalformedURLException
{
DesiredCapabilities c=new DesiredCapabilities();
c.setCapability(CapabilityType.BROWSER_NAME, "");
c.setCapability("deviceName", "ZZ2222HMLF");
c.setCapability("platformName", "Android");
c.setCapability("platformversion", "7.0");
c.setCapability(MobileCapabilityType.APP, "D:\\Appium\\edTheSIS_11_02_2019.apk");
c.setCapability("noReset", true);
c.setCapability("autoGrantPermissions", "true");
c.setCapability("appPackage","com.sisapp.in.sisapp");
//c.setCapability("appPackage","com.sisapp.in.sisapp.SplashActivity"); Tried not working same issue
c.setCapability("appActivity", "SplashActivity");
//c.setCapability("appActivity",".md5b1afd03e09ce5243fd0287b176ff38ea.MainActivity");
URL U=new URL("http://127.0.0.1:4723/wd/hub");
WebDriver driver=new AndroidDriver(U,c);
//driver.findElement(By.linkText("Username")).sendKeys("as@ct");
}
}
TLDR:
Original error: Activity name '.SplashActivity' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity
Below is my error log
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.sisapp.in.sisapp' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Cannot start the 'com.sisapp.in.sisapp' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Activity name '.SplashActivity' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:14.666Z' System info: host: 'DELL30', ip: '10.10.4.222', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_151' Driver info: driver.version: AndroidDriver remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.sisapp.in.sisapp' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Cannot start the 'com.sisapp.in.sisapp' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Activity name '.SplashActivity' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity at getResponseForW3CError (C:\Users\arvind\AppData\Local\appium-desktop\app-1.10.0\resources\app\node_modules\appium-base-driver\lib\protocol\errors.js:826:9) at asyncHandler (C:\Users\arvind\AppData\Local\appium-desktop\app-1.10.0\resources\app\node_modules\appium-base-driver\lib\protocol\protocol.js:447:37) at process._tickCallback (internal/process/next_tick.js:68:7) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57) at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104) at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source) at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source) at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source) at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.util.stream.ReferencePipeline.findFirst(Unknown Source) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:89) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142) at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:83) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:93) at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:72) at Mobileapp1.Apptesting.main(Apptesting.java:29)