xSAVIKx/AndroidScreencast

Cannot start without app.properties.

Closed this issue · 13 comments

As my pull request. The app cannot search the PATH for adb.
Here is the logcat . Seems Windows platform has the same logcat as Linux platform.

22:35:03 [DEBUG] [InjectionMetadata] - Registered injected element on class [com.github.xsavikx.android.screencast.app.DeviceChooserApplication]: AutowiredFieldElement for private org.springframework.core.env.Environment com.github.xsavikx.android.screencast.app.DeviceChooserApplication.env
22:35:03 [DEBUG] [InjectionMetadata] - Registered injected element on class [com.github.xsavikx.android.screencast.app.DeviceChooserApplication]: AutowiredFieldElement for private com.android.ddmlib.AndroidDebugBridge com.github.xsavikx.android.screencast.app.DeviceChooserApplication.bridge
22:35:03 [DEBUG] [AbstractAutowireCapableBeanFactory] - Eagerly caching bean 'deviceChooserApplication' to allow for resolving potential circular references
22:35:03 [DEBUG] [InjectionMetadata] - Processing injected element of bean 'deviceChooserApplication': AutowiredFieldElement for private org.springframework.core.env.Environment com.github.xsavikx.android.screencast.app.DeviceChooserApplication.env
22:35:03 [DEBUG] [AbstractBeanFactory] - Returning cached instance of singleton bean 'environment'
22:35:03 [DEBUG] [AutowiredAnnotationBeanPostProcessor] - Autowiring by type from bean name 'deviceChooserApplication' to bean named 'environment'
22:35:03 [DEBUG] [InjectionMetadata] - Processing injected element of bean 'deviceChooserApplication': AutowiredFieldElement for private com.android.ddmlib.AndroidDebugBridge com.github.xsavikx.android.screencast.app.DeviceChooserApplication.bridge
22:35:03 [DEBUG] [DefaultSingletonBeanRegistry] - Creating shared instance of singleton bean 'initAndroidDebugBridge'
22:35:03 [DEBUG] [AbstractAutowireCapableBeanFactory] - Creating instance of bean 'initAndroidDebugBridge'
22:35:03 [DEBUG] [AbstractBeanFactory] - Returning cached instance of singleton bean 'applicationConfiguration'
10:35:03 E/DeviceMonitor: Connection attempts: 1
22:35:03 [DEBUG] [AbstractAutowireCapableBeanFactory] - Eagerly caching bean 'initAndroidDebugBridge' to allow for resolving potential circular references
22:35:03 [DEBUG] [AbstractAutowireCapableBeanFactory] - Finished creating instance of bean 'initAndroidDebugBridge'
22:35:03 [DEBUG] [AutowiredAnnotationBeanPostProcessor] - Autowiring by type from bean name 'deviceChooserApplication' to bean named 'initAndroidDebugBridge'
22:35:03 [DEBUG] [AbstractAutowireCapableBeanFactory] - Finished creating instance of bean 'deviceChooserApplication'
22:35:03 [DEBUG] [ConstructorResolver] - Autowiring by type from bean name 'initDevice' via factory method to bean named 'deviceChooserApplication'
22:35:03 [DEBUG] [DeviceChooserApplication] - isNativeLook() - start
22:35:03 [DEBUG] [PropertySourcesPropertyResolver] - Searching for key 'app.nativeLook' in [systemProperties]
22:35:03 [DEBUG] [PropertySourcesPropertyResolver] - Searching for key 'app.nativeLook' in [systemEnvironment]
22:35:03 [DEBUG] [PropertySourcesPropertyResolver] - Could not find key 'app.nativeLook' in any property source. Returning [null]
22:35:03 [DEBUG] [DeviceChooserApplication] - isNativeLook() - end
22:35:03 [DEBUG] [DeviceChooserApplication] - start() - start
22:35:03 [DEBUG] [DeviceChooserApplication] - initialize() - start
22:35:03 [DEBUG] [DeviceChooserApplication] - waitDeviceList(AndroidDebugBridge bridge=com.android.ddmlib.AndroidDebugBridge@2ded1e04) - start
10:35:04 E/DeviceMonitor: Connection attempts: 2
10:35:05 E/DeviceMonitor: Connection attempts: 3
10:35:06 E/DeviceMonitor: Connection attempts: 4
10:35:07 E/DeviceMonitor: Connection attempts: 5
10:35:08 E/DeviceMonitor: Connection attempts: 6
10:35:09 E/DeviceMonitor: Connection attempts: 7
10:35:10 E/DeviceMonitor: Connection attempts: 8
10:35:11 E/DeviceMonitor: Connection attempts: 9
10:35:12 E/DeviceMonitor: Connection attempts: 10
10:35:13 E/DeviceMonitor: Connection attempts: 11
10:35:13 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:13 E/DeviceMonitor: adb restart attempts: 1
10:35:14 E/DeviceMonitor: Connection attempts: 12
10:35:14 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:14 E/DeviceMonitor: adb restart attempts: 2
10:35:15 E/DeviceMonitor: Connection attempts: 13
10:35:15 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:15 E/DeviceMonitor: adb restart attempts: 3
10:35:16 E/DeviceMonitor: Connection attempts: 14
10:35:16 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:16 E/DeviceMonitor: adb restart attempts: 4
10:35:17 E/DeviceMonitor: Connection attempts: 15
10:35:17 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:17 E/DeviceMonitor: adb restart attempts: 5
10:35:18 E/DeviceMonitor: Connection attempts: 16
10:35:18 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:18 E/DeviceMonitor: adb restart attempts: 6
10:35:19 E/DeviceMonitor: Connection attempts: 17
10:35:19 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:19 E/DeviceMonitor: adb restart attempts: 7
10:35:20 E/DeviceMonitor: Connection attempts: 18
10:35:20 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:20 E/DeviceMonitor: adb restart attempts: 8
10:35:21 E/DeviceMonitor: Connection attempts: 19
10:35:21 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:21 E/DeviceMonitor: adb restart attempts: 9
10:35:22 E/DeviceMonitor: Connection attempts: 20
10:35:22 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:22 E/DeviceMonitor: adb restart attempts: 10
10:35:23 E/DeviceMonitor: Connection attempts: 21
10:35:23 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:23 E/DeviceMonitor: adb restart attempts: 11
10:35:24 E/DeviceMonitor: Connection attempts: 22
10:35:24 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:24 E/DeviceMonitor: adb restart attempts: 12
10:35:25 E/DeviceMonitor: Connection attempts: 23
10:35:25 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:25 E/DeviceMonitor: adb restart attempts: 13
10:35:26 E/DeviceMonitor: Connection attempts: 24
10:35:26 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:26 E/DeviceMonitor: adb restart attempts: 14
10:35:27 E/DeviceMonitor: Connection attempts: 25
10:35:27 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:27 E/DeviceMonitor: adb restart attempts: 15
10:35:28 E/DeviceMonitor: Connection attempts: 26
10:35:28 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:28 E/DeviceMonitor: adb restart attempts: 16
10:35:29 E/DeviceMonitor: Connection attempts: 27
10:35:29 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:29 E/DeviceMonitor: adb restart attempts: 17
10:35:30 E/DeviceMonitor: Connection attempts: 28
10:35:30 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:30 E/DeviceMonitor: adb restart attempts: 18
10:35:31 E/DeviceMonitor: Connection attempts: 29
10:35:31 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:31 E/DeviceMonitor: adb restart attempts: 19
10:35:32 E/DeviceMonitor: Connection attempts: 30
10:35:32 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:32 E/DeviceMonitor: adb restart attempts: 20
10:35:33 E/DeviceMonitor: Connection attempts: 31
10:35:33 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:33 E/DeviceMonitor: adb restart attempts: 21
22:35:33 [WARN ] [AbstractApplicationContext] - Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'JDialogExecuteKeyEvent': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.github.xsavikx.android.screencast.api.command.executor.CommandExecutor com.github.xsavikx.android.screencast.ui.JDialogExecuteKeyEvent.commandExecutor; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellCommandExecutor': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.android.ddmlib.IDevice com.github.xsavikx.android.screencast.api.command.executor.ShellCommandExecutor.device; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initDevice' defined in com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.android.ddmlib.IDevice]: Factory method 'initDevice' threw exception; nested exception is java.lang.RuntimeException: Timeout getting device list!
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
    at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84)
    at com.github.xsavikx.android.screencast.spring.config.ApplicationContextProvider.getApplicationContext(ApplicationContextProvider.java:17)
    at com.github.xsavikx.android.screencast.Main.main(Main.java:16)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.simontuffs.onejar.Boot.run(Boot.java:313)
    at com.simontuffs.onejar.Boot.main(Boot.java:161)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.github.xsavikx.android.screencast.api.command.executor.CommandExecutor com.github.xsavikx.android.screencast.ui.JDialogExecuteKeyEvent.commandExecutor; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellCommandExecutor': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.android.ddmlib.IDevice com.github.xsavikx.android.screencast.api.command.executor.ShellCommandExecutor.device; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initDevice' defined in com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.android.ddmlib.IDevice]: Factory method 'initDevice' threw exception; nested exception is java.lang.RuntimeException: Timeout getting device list!
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:571)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
    ... 19 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellCommandExecutor': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.android.ddmlib.IDevice com.github.xsavikx.android.screencast.api.command.executor.ShellCommandExecutor.device; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initDevice' defined in com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.android.ddmlib.IDevice]: Factory method 'initDevice' threw exception; nested exception is java.lang.RuntimeException: Timeout getting device list!
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1145)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1069)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:967)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:543)
    ... 21 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.android.ddmlib.IDevice com.github.xsavikx.android.screencast.api.command.executor.ShellCommandExecutor.device; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initDevice' defined in com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.android.ddmlib.IDevice]: Factory method 'initDevice' threw exception; nested exception is java.lang.RuntimeException: Timeout getting device list!
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:571)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
    ... 32 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initDevice' defined in com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.android.ddmlib.IDevice]: Factory method 'initDevice' threw exception; nested exception is java.lang.RuntimeException: Timeout getting device list!
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1145)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1069)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:967)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:543)
    ... 34 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.android.ddmlib.IDevice]: Factory method 'initDevice' threw exception; nested exception is java.lang.RuntimeException: Timeout getting device list!
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    ... 46 more
Caused by: java.lang.RuntimeException: Timeout getting device list!
    at com.github.xsavikx.android.screencast.app.DeviceChooserApplication.waitDeviceList(DeviceChooserApplication.java:62)
    at com.github.xsavikx.android.screencast.app.DeviceChooserApplication.initialize(DeviceChooserApplication.java:72)
    at com.github.xsavikx.android.screencast.app.DeviceChooserApplication.start(DeviceChooserApplication.java:32)
    at com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration.initDevice(ApplicationConfiguration.java:42)
    at com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration$$EnhancerBySpringCGLIB$$b32caf2d.CGLIB$initDevice$1(<generated>)
    at com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration$$EnhancerBySpringCGLIB$$b32caf2d$$FastClassBySpringCGLIB$$3a910e23.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:318)
    at com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration$$EnhancerBySpringCGLIB$$b32caf2d.initDevice(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    ... 47 more
22:35:33 [DEBUG] [DefaultSingletonBeanRegistry] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3a4b9e67: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,applicationConfiguration,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor,JDialogExecuteKeyEvent,JFrameExplorer,JFrameMain,androidScreencastApplication,deviceChooserApplication,androidDeviceImpl,screenCaptureThread,injector,shellCommandExecutor,adbInputCommandFactory,fileInfo,initBeanFactory,initDevice,initAndroidDebugBridge]; root of factory hierarchy
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.simontuffs.onejar.Boot.run(Boot.java:313)
    at com.simontuffs.onejar.Boot.main(Boot.java:161)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'JDialogExecuteKeyEvent': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.github.xsavikx.android.screencast.api.command.executor.CommandExecutor com.github.xsavikx.android.screencast.ui.JDialogExecuteKeyEvent.commandExecutor; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellCommandExecutor': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.android.ddmlib.IDevice com.github.xsavikx.android.screencast.api.command.executor.ShellCommandExecutor.device; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initDevice' defined in com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.android.ddmlib.IDevice]: Factory method 'initDevice' threw exception; nested exception is java.lang.RuntimeException: Timeout getting device list!
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
    at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84)
    at com.github.xsavikx.android.screencast.spring.config.ApplicationContextProvider.getApplicationContext(ApplicationContextProvider.java:17)
    at com.github.xsavikx.android.screencast.Main.main(Main.java:16)
    ... 6 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.github.xsavikx.android.screencast.api.command.executor.CommandExecutor com.github.xsavikx.android.screencast.ui.JDialogExecuteKeyEvent.commandExecutor; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellCommandExecutor': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.android.ddmlib.IDevice com.github.xsavikx.android.screencast.api.command.executor.ShellCommandExecutor.device; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initDevice' defined in com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.android.ddmlib.IDevice]: Factory method 'initDevice' threw exception; nested exception is java.lang.RuntimeException: Timeout getting device list!
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:571)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
    ... 19 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellCommandExecutor': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.android.ddmlib.IDevice com.github.xsavikx.android.screencast.api.command.executor.ShellCommandExecutor.device; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initDevice' defined in com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.android.ddmlib.IDevice]: Factory method 'initDevice' threw exception; nested exception is java.lang.RuntimeException: Timeout getting device list!
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1145)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1069)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:967)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:543)
    ... 21 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.android.ddmlib.IDevice com.github.xsavikx.android.screencast.api.command.executor.ShellCommandExecutor.device; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initDevice' defined in com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.android.ddmlib.IDevice]: Factory method 'initDevice' threw exception; nested exception is java.lang.RuntimeException: Timeout getting device list!
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:571)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
    ... 32 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initDevice' defined in com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.android.ddmlib.IDevice]: Factory method 'initDevice' threw exception; nested exception is java.lang.RuntimeException: Timeout getting device list!
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1145)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1069)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:967)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:543)
    ... 34 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.android.ddmlib.IDevice]: Factory method 'initDevice' threw exception; nested exception is java.lang.RuntimeException: Timeout getting device list!
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    ... 46 more
Caused by: java.lang.RuntimeException: Timeout getting device list!
    at com.github.xsavikx.android.screencast.app.DeviceChooserApplication.waitDeviceList(DeviceChooserApplication.java:62)
    at com.github.xsavikx.android.screencast.app.DeviceChooserApplication.initialize(DeviceChooserApplication.java:72)
    at com.github.xsavikx.android.screencast.app.DeviceChooserApplication.start(DeviceChooserApplication.java:32)
    at com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration.initDevice(ApplicationConfiguration.java:42)
    at com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration$$EnhancerBySpringCGLIB$$b32caf2d.CGLIB$initDevice$1(<generated>)
    at com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration$$EnhancerBySpringCGLIB$$b32caf2d$$FastClassBySpringCGLIB$$3a910e23.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:318)
    at com.github.xsavikx.android.screencast.spring.config.ApplicationConfiguration$$EnhancerBySpringCGLIB$$b32caf2d.initDevice(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    ... 47 more
10:35:34 E/DeviceMonitor: Connection attempts: 32
10:35:34 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:34 E/DeviceMonitor: adb restart attempts: 22
10:35:35 E/DeviceMonitor: Connection attempts: 33
10:35:35 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:35 E/DeviceMonitor: adb restart attempts: 23
10:35:36 E/DeviceMonitor: Connection attempts: 34
10:35:36 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:36 E/DeviceMonitor: adb restart attempts: 24
10:35:37 E/DeviceMonitor: Connection attempts: 35
10:35:37 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:37 E/DeviceMonitor: adb restart attempts: 25
10:35:38 E/DeviceMonitor: Connection attempts: 36
10:35:38 E/adb: Cannot start adb when AndroidDebugBridge is created without the location of adb.
10:35:38 E/DeviceMonitor: adb restart attempts: 26

@wzhy90, please attach app.properties and AndroidScreencast.log files to issue.

I've just tested last version (0.0.5.1S) on my Win7x64 laptop and everything is working normally without any properties at all.
I've just download release and run it.

The problem may be, if you don't have adb folder in your PATH system variable and you don't point full path in app.properties.
Check if you can run adb via CMD.

Yes,I have copy adb to C:\Windows. Also Win7x64, with x86 JRE or JDK.

@wzhy90 , I don't understand you :-(
If you just copy adb into C:\Windows - this won't add program to PATH variable.
Please, take look at http://www.computerhope.com/issues/ch000549.htm
And if it helps - please close the issue.

Yes, but the C:\Windows is the default value in the system wide PATH.
So I can run adb in cmd.exe by typing without any other keys.
But this app cannot use only adb to start adb server.

Did you also copy AdbWinApi.dll and AdbWinUsbApi.dll ?

I experienced the same in OSX (El Capitan), even though adb was in the path and functioning correctly. In order to fix this I had to place an app.properties file with the following content in the same folder as the AndroidScreenCast jar:

adb.path=/usr/local/bin/adb
default.window.width=1024
default.window.height=768

Might be nice to mention this in the docs though...

I got that. Probably some problem in the ddmlib library, will try to investigate to root source of problem and maybe submit issue to Android developers

@xSAVIKx sounds like a plan, but like I said mentioning this in the docs in the meantime could be nice...

@ohadschn I've added Configuration section into the README, please check if it's OK for you.

@xSAVIKx looks good, thanks! Only thing I would change is "near the runnable .jar" to "in the same folder as AndroidScreencast's jar". I would also mention that a an example for that file could be found at https://github.com/xSAVIKx/AndroidScreencast/blob/develop/app.properties.

@ohadschn done. Thanks.

Regarding to latest research:
I've wrongly used DDMLIB methods in order to create programmatic ADB bridge.
I need to change documentation, to be sure that application will be used correctly. So for now - it's documentation bug.