pbreault / adb-idea Goto Github PK
View Code? Open in Web Editor NEWA plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.
License: Apache License 2.0
A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.
License: Apache License 2.0
Hello and thank you for your plugin.
A screenshot and/or a screencast is often worth 10.000 words to illustrate your point.
So I made three bash helper funcitons (definitions below)
android_screenshot
android_recordscreencast
android_pullscreencast
What do you think of integrating that in your plugin?
### $HOME/.bash_profile
export DESKTOPFOLDER="$HOME/Downloads"
export ANDROIDFOLDER="/storage/sdcard1"
android_screenshot() {
adb devices
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > "$DESKTOPFOLDER/androidscreenshot-$(filetimestamp).png"
open "$DESKTOPFOLDER"
}
android_recordscreencast() {
adb devices
echo "Press Ctrl-C to stop screencast"
echo "then type: $ android_pullscreencast"
echo
adb shell screenrecord --verbose "$ANDROIDFOLDER/screenrecord.mp4"
}
android_pullscreencast() {
adb pull "$ANDROIDFOLDER/screenrecord.mp4" "$DESKTOPFOLDER/androidscreencast-$(filetimestamp).mp4"
open $DESKTOPFOLDER
}
filetimestamp() {
echo $(date "+%Y%m%d-%H:%M:%S")
}
I've downloaded the source code to tinker around with it but I can't seem to get passed AndroidUtils.getApplicationFacets(project) as it always returns 0.
I can go into Project Settings -> Facets and see a list of them so why aren't they being found?
I know this isn't an issue with your code per se but I was just wondering if you had come across this when developing.
Thanks
This is for a version I built myself against Idea IC 15.0.5 ide + Android Studio preview 2.1 android plugin dependencies on the latest commit as of 2 April. I had other variations of dependencies but I never ever was able to go past this error, even with previous versions of the code by mid January.
However downloading and installing from inside android studio works like a charm.
is it possible to add a command to install the last build ?
thanks !
instead of going through the menus.
Also, please add cache cleaning.
Hey,
I'm trying to add at least two features to you plugin, but have a problem with setting up development environment.
My first step is mavenizing project, but it seems that I cannot find the correct packages.
The classes I'm missing are:
com.intellij.openapi.roots.ui.configuration.ChooseModulesDialog
com.intellij.openapi.actionSystem.PlatformDataKeys
I tried with the last version of intellij openapi 7.0.3.
Can you share you environment details?
cheers,
Patryk
So I've got a pretty complex project structure (multiple modules, manifests, and flavours), and I assume this may be confusing the plugin, because when I try to select start
or restart
it returns:
ADB IDEA: <applicationId> could not bet started on asus-nexus_7-06d8b524.
ADB Output:
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=<applicationId>/null }
Error type 3
Error: Activity class {<applicationId>/null} does not exist.
ApplicationId is recognized correctly, so all other commands work fine, it's only the main activity that cannot be correctly identified.
When I'm logged in on my device as a user that isn't the 'device owner' and I have my app running, performing 'clear app data and reset' doesn't clear the data for the current user and the app doesn't restart.
I have defined suffix for debug build. This is not taken into account (the release package is used). The plugin just shows error message because it uses wrong package name.
buildTypes {
debug {
packageNameSuffix ".debug"
}
}
I'm not sure if it's possible, but sometimes it's handy to have.
I'm talking about keeping app data and clearing just cache.
Hi,I try to write a plugin to use adb push ,But I can not get the "adb" command.
I read your code , find you use the AndroidSdkUtils.getAndroidSdkPathsFromExistingPlatforms()
,but I can not import AndroidSdkUtils
Could you tell me why? Please.
(sorry for my English)
There is a problem with the latest update of Android Studio (0.4.4). This is a little stacktrace:
NoSuchMethodError: org.jetbrains.android.facet.AndroidFacet.getAndroidModuleInfo()Lcom/android/tools/idea/gradle/AndroidModuleInfo;: org.jetbrains.android.facet.AndroidFacet.getAndroidModuleInfo()Lcom/android/tools/idea/gradle/AndroidModuleInfo;
The plugin doesn't work at all.
Great work, and sorry for my bad english
It will be great if here was a possibility to use connect/disconnect commands.
I every day in studio console go to platform-tools and type ./adb connect 192.168.1.xxx to attach my phone via adb wireless so it will be cool to do with one key shortcut
NoSuchMethodError on AS 2.0
Will be great if I can attach debug to the restored one from the menu on start.
NoSuchMethodError: org.jetbrains.android.facet.AndroidFacet.getDebugBridge()Lcom/android/ddmlib/AndroidDebugBridge;: org.jetbrains.android.facet.AndroidFacet.getDebugBridge()Lcom/android/ddmlib/AndroidDebugBridge;
Hi,
I'm not sure if this is information you could extract, but I've ran into this issue:
I configured a Specific Activity in the Launch Options in the Run/Debug Configurations
screen.
When I start the app with ADB Idea, it starts the Default Activity.
Sometimes ADB stucks, so I have to execute command adb kill-server; adb-start-server
to restart it. Please, add this command to actions list.
Thanks so much for your plugin!
Can't use any of the commands with AS 0.6.1, get the following crash:
org.jetbrains.android.run.DeviceChooser.(ZLjavax/swing/Action;Lorg/jetbrains/android/facet/AndroidFacet;Lcom/intellij/openapi/util/Condition;)V: org.jetbrains.android.run.DeviceChooser.(ZLjavax/swing/Action;Lorg/jetbrains/android/facet/AndroidFacet;Lcom/intellij/openapi/util/Condition;)V
java.lang.NoSuchMethodError: org.jetbrains.android.run.DeviceChooser.(ZLjavax/swing/Action;Lorg/jetbrains/android/facet/AndroidFacet;Lcom/intellij/openapi/util/Condition;)V
at com.developerphil.adbidea.ui.DeviceChooserDialog.(DeviceChooserDialog.java:44)
at com.developerphil.adbidea.adb.AdbFacade.askUserForDevice(AdbFacade.java:118)
at com.developerphil.adbidea.adb.AdbFacade.getDevice(AdbFacade.java:90)
at com.developerphil.adbidea.adb.AdbFacade.executeOnDevice(AdbFacade.java:50)
at com.developerphil.adbidea.adb.AdbFacade.clearDataAndRestart(AdbFacade.java:46)
at com.developerphil.adbidea.action.ClearDataAndRestartAction.actionPerformed(ClearDataAndRestartAction.java:10)
at com.developerphil.adbidea.action.AdbAction.actionPerformed(AdbAction.java:13)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:164)
at com.intellij.ide.actions.GotoActionAction$5.run(GotoActionAction.java:130)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
When few devices connected after choosing command get exception:
java.lang.NoSuchMethodException: org.jetbrains.android.run.DeviceChooser.(java.lang.Boolean, com.intellij.openapi.ui.DialogWrapper$OkAction, org.jetbrains.android.facet.AndroidFacet, com.developerphil.adbidea.ui.DeviceChooserDialog$2)
org.joor.ReflectException: java.lang.NoSuchMethodException: org.jetbrains.android.run.DeviceChooser.(java.lang.Boolean, com.intellij.openapi.ui.DialogWrapper$OkAction, org.jetbrains.android.facet.AndroidFacet, com.developerphil.adbidea.ui.DeviceChooserDialog$2)
at org.joor.Reflect.create(Reflect.java:422)
at com.developerphil.adbidea.ui.DeviceChooserDialog.buildPreZeroDotSixDeviceChooser(DeviceChooserDialog.java:75)
at com.developerphil.adbidea.ui.DeviceChooserDialog.newDeviceChooser(DeviceChooserDialog.java:69)
at com.developerphil.adbidea.ui.DeviceChooserDialog.(DeviceChooserDialog.java:46)
at com.developerphil.adbidea.adb.AdbFacade.askUserForDevice(AdbFacade.java:119)
at com.developerphil.adbidea.adb.AdbFacade.getDevice(AdbFacade.java:91)
at com.developerphil.adbidea.adb.AdbFacade.executeOnDevice(AdbFacade.java:51)
at com.developerphil.adbidea.adb.AdbFacade.uninstall(AdbFacade.java:27)
at com.developerphil.adbidea.action.UninstallAction.actionPerformed(UninstallAction.java:10)
at com.developerphil.adbidea.action.AdbAction.actionPerformed(AdbAction.java:13)
at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:746)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:734)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:569)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.NoSuchMethodException: org.jetbrains.android.run.DeviceChooser.(java.lang.Boolean, com.intellij.openapi.ui.DialogWrapper$OkAction, org.jetbrains.android.facet.AndroidFacet, com.developerphil.adbidea.ui.DeviceChooserDialog$2)
at java.lang.Class.getConstructor0(Class.java:2763)
at java.lang.Class.getConstructor(Class.java:1693)
at org.joor.Reflect.create(Reflect.java:409)
... 27 more
Android Studio 2.0 Preview 9
Build #AI-143.2571730, built on January 29, 2016
JRE: 1.6.0_65-b14-468-11M4833 x86_64
JVM: Java HotSpot(TM) 64-Bit Server VM by Apple Inc.
Two Emulators and one device connected.
12:04:12 PM ReflectException: java.lang.NoSuchMethodException: No similar method canRunOnDevice with params [class com.android.sdklib.AndroidVersion, class com.android.sdklib.repositoryv2.targets.PlatformTarget, class java.util.RegularEnumSet, class com.android.ddmlib.Device, class org.joor.Reflect$NULL] could be found on type class com.android.tools.idea.run.LaunchCompatibility.
This adb command shows you the current opened activity in your application:
adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'
It would be nice to have a shortcut that automagically opens that Activity class on Android Studio
java.lang.NoSuchMethodException: No similar method canRunOnDevice with params [class com.android.sdklib.AndroidVersion, class com.android.sdklib.repository.targets.PlatformTarget, class java.util.RegularEnumSet, class com.android.ddmlib.Device, class org.joor.Reflect$NULL] could be found on type class com.android.tools.idea.run.LaunchCompatibility.
org.joor.ReflectException: java.lang.NoSuchMethodException: No similar method canRunOnDevice with params [class com.android.sdklib.AndroidVersion, class com.android.sdklib.repository.targets.PlatformTarget, class java.util.RegularEnumSet, class com.android.ddmlib.Device, class org.joor.Reflect$NULL] could be found on type class com.android.tools.idea.run.LaunchCompatibility.
at org.joor.Reflect.call(Reflect.java:406)
at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompatBefore2_0.getPreviousImplementation(CanRunOnDeviceCompatBefore2_0.java:37)
at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompatBefore2_0.getPreviousImplementation(CanRunOnDeviceCompatBefore2_0.java:13)
at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:17)
at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getPreviousImplementation(CanRunOnDeviceCompat.java:36)
at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getPreviousImplementation(CanRunOnDeviceCompat.java:12)
at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:14)
at com.developerphil.adbidea.ui.MyDeviceChooser$MyDeviceTableModel.getValueAt(MyDeviceChooser.java:422)
at javax.swing.JTable.getValueAt(JTable.java:2717)
at com.intellij.ui.table.JBTable.calculateRowHeight(JBTable.java:178)
at com.intellij.ui.table.JBTable.getRowHeight(JBTable.java:157)
at javax.swing.JTable.getRowHeight(JTable.java:992)
at javax.swing.JTable.getCellRect(JTable.java:2937)
at javax.swing.JTable.valueChanged(JTable.java:4698)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:164)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:211)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:405)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:415)
at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:459)
at com.developerphil.adbidea.ui.MyDeviceChooser.refreshTable(MyDeviceChooser.java:296)
at com.developerphil.adbidea.ui.MyDeviceChooser.access$600(MyDeviceChooser.java:68)
at com.developerphil.adbidea.ui.MyDeviceChooser$6.run(MyDeviceChooser.java:275)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:345)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:329)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:658)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:792)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1661)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1610)
at com.developerphil.adbidea.adb.AdbFacade.askUserForDevice(AdbFacade.java:120)
at com.developerphil.adbidea.adb.AdbFacade.getDevice(AdbFacade.java:91)
at com.developerphil.adbidea.adb.AdbFacade.executeOnDevice(AdbFacade.java:51)
at com.developerphil.adbidea.adb.AdbFacade.restartDefaultActivity(AdbFacade.java:39)
at com.developerphil.adbidea.action.RestartAction.actionPerformed(RestartAction.java:10)
at com.developerphil.adbidea.action.AdbAction.actionPerformed(AdbAction.java:13)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:191)
at com.intellij.ide.actions.GotoActionAction$7.run(GotoActionAction.java:275)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:345)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:329)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:658)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NoSuchMethodException: No similar method canRunOnDevice with params [class com.android.sdklib.AndroidVersion, class com.android.sdklib.repository.targets.PlatformTarget, class java.util.RegularEnumSet, class com.android.ddmlib.Device, class org.joor.Reflect$NULL] could be found on type class com.android.tools.idea.run.LaunchCompatibility.
at org.joor.Reflect.similarMethod(Reflect.java:473)
at org.joor.Reflect.call(Reflect.java:403)
... 75 more
org.joor.ReflectException: java.lang.NoSuchMethodException: No similar method canRunOnDevice with params [class com.android.sdklib.AndroidVersion, class com.android.sdklib.repository.targets.PlatformTarget, class java.util.RegularEnumSet, class com.android.ddmlib.Device, class org.joor.Reflect$NULL] could be found on type class com.android.tools.idea.run.LaunchCompatibility.
at org.joor.Reflect.call(Reflect.java:406)
at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompatBefore2_0.getPreviousImplementation(CanRunOnDeviceCompatBefore2_0.java:37)
at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompatBefore2_0.getPreviousImplementation(CanRunOnDeviceCompatBefore2_0.java:13)
at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:17)
at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getPreviousImplementation(CanRunOnDeviceCompat.java:36)
at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getPreviousImplementation(CanRunOnDeviceCompat.java:12)
at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:14)
at com.developerphil.adbidea.ui.MyDeviceChooser$MyDeviceTableModel.getValueAt(MyDeviceChooser.java:422)
at javax.swing.JTable.getValueAt(JTable.java:2717)
at com.intellij.ui.table.JBTable.calculateRowHeight(JBTable.java:178)
at com.intellij.ui.table.JBTable.getRowHeight(JBTable.java:157)
at javax.swing.JTable.rowAtPoint(JTable.java:2869)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1781)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
at javax.swing.JComponent.paintComponent(JComponent.java:780)
at com.intellij.ui.table.JBTable.paintComponent(JBTable.java:301)
at javax.swing.JComponent.paint(JComponent.java:1056)
at com.intellij.ui.table.JBTable.paint(JBTable.java:395)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JViewport.paint(JViewport.java:728)
at com.intellij.ui.components.JBViewport.paint(JBViewport.java:165)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:658)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:792)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1661)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1610)
at com.developerphil.adbidea.adb.AdbFacade.askUserForDevice(AdbFacade.java:120)
at com.developerphil.adbidea.adb.AdbFacade.getDevice(AdbFacade.java:91)
at com.developerphil.adbidea.adb.AdbFacade.executeOnDevice(AdbFacade.java:51)
at com.developerphil.adbidea.adb.AdbFacade.restartDefaultActivity(AdbFacade.java:39)
at com.developerphil.adbidea.action.RestartAction.actionPerformed(RestartAction.java:10)
at com.developerphil.adbidea.action.AdbAction.actionPerformed(AdbAction.java:13)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:191)
at com.intellij.ide.actions.GotoActionAction$7.run(GotoActionAction.java:275)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:345)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:329)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:658)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NoSuchMethodException: No similar method canRunOnDevice with params [class com.android.sdklib.AndroidVersion, class com.android.sdklib.repository.targets.PlatformTarget, class java.util.RegularEnumSet, class com.android.ddmlib.Device, class org.joor.Reflect$NULL] could be found on type class com.android.tools.idea.run.LaunchCompatibility.
at org.joor.Reflect.similarMethod(Reflect.java:473)
at org.joor.Reflect.call(Reflect.java:403)
... 89 more
When the app gets to Application not responding state, Android automatically generates file /data/anr/traces.txt
with stack traces of all threads. It's very useful for debugging this problem, because you immediately see which thread and where is stuck.
But to get this file, you have to disconnect all devices (because you don't remember the id for the -s
switch) and type adb pull /data/anr/traces.txt
a open it on some text editor.
This sucks.
It would be most awesome to have this feature accessible in Android Studio. And I think it fits in this plugin.
I use android studio 1.1.0
The plugin works fine in one of my projects. But when I switch to the other one and try to invoke any command from the plugin I see an error "No device found".
The device is actually available and visible in e.g. android ddms.
I tried to reinstall the plugin but it doesn't help.
What can be wrong and how to debug the problem?
As per Özcan Kaymak's suggestion in the Google+ thread, we should have icons so that the actions are recognizable in a toolbar.
When I cancel the module choose dialog I get:
ADB IDEA: No Device found
There should be no error message in this scenario.
Sometimes I will have two devices attached at once.
Would be nice to clear app data on more than one device at a time with a multi-select option.
Thanks!
If I have a project with various modules, What module is selected for execute actions from tools/Android/ADB Idea?
Now always select the same module and I don't know change the active module.
Regards
Thanks for the great tool A must have!
Anyway I'm not able to start/restart on an old device running Android 2.3.6 (lg e510).
Keep up the good work ;)
I have wear and android module, every time I invoke adb-idea its prompts to select which module, it would be nice if it automatically selects based on current source, or atleast some settings to remember which module to pick.
hello.thanks for the awesome plugin.
I want to know can we get the current packageName with adb command?
Just get the running app‘s PackageName.
thanks.
I use packageNameSuffix ".debug"
in my build.gradle
to differ between a debug and a release installation. It would be great if you could support uninstalling different package names and let the user choose which to uninstall.
buildTypes {
debug {
packageNameSuffix ".debug"
}
}
Pleaser consider adding an action to install the artifact from the previous build. This is useful when your build is slow and all you want to do is install the apk in build/outputs/apk. If there are multiple APKs, for example for different flavors, a chooser could be displayd.
what the title says
Plugin version 1.2.2, Android Studio 1.5 (canary), multiple modules, multiple devices.
When I want to do something with your plugin (which is awesome, btw) I get the dialog which let me choose module (app or wear, in my project) and when I choose one, it crashes with the following stack trace:
com.android.tools.idea.model.ManifestInfo.getRequiredFeatures()Ljava/util/List;
java.lang.NoSuchMethodError: com.android.tools.idea.model.ManifestInfo.getRequiredFeatures()Ljava/util/List;
at com.developerphil.adbidea.ui.MyDeviceChooser.<init>(MyDeviceChooser.java:117)
at com.developerphil.adbidea.ui.DeviceChooserDialog.<init>(DeviceChooserDialog.java:36)
at com.developerphil.adbidea.adb.AdbFacade.askUserForDevice(AdbFacade.java:119)
at com.developerphil.adbidea.adb.AdbFacade.getDevice(AdbFacade.java:91)
at com.developerphil.adbidea.adb.AdbFacade.executeOnDevice(AdbFacade.java:51)
at com.developerphil.adbidea.adb.AdbFacade.clearDataAndRestart(AdbFacade.java:47)
at com.developerphil.adbidea.action.ClearDataAndRestartAction.actionPerformed(ClearDataAndRestartAction.java:10)
at com.developerphil.adbidea.action.AdbAction.actionPerformed(AdbAction.java:13)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:182)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:312)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:958)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:109)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:512)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
at java.awt.Component.processMouseEvent(Component.java:6525)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6290)
at java.awt.Container.processEvent(Container.java:2234)
at java.awt.Component.dispatchEventImpl(Component.java:4881)
at java.awt.Container.dispatchEventImpl(Container.java:2292)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
at java.awt.Container.dispatchEventImpl(Container.java:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:734)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:565)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
There are adb commands that will grant or deny an app permissions. It would be helpful if the plugin included this for testing (https://developer.android.com/training/permissions/best-practices.html#testing)
Hi,
When I have multiple devices connected (a Nexus 5X and a Samsung GS5) using USB, the window to choose the device is empty and so no action (delete app, reset app, ...) are possible.
If I unplug all devices except one, the device chooser logically don't appear and the action works.
Thanks.
when i change my source code ,I want to re_install my app . how there is no install app command
Hi, first of all thanks for the plugin - it's very handy and useful.
I suggest adding an unlock phone action:
adb shell input keyevent 82
to the list of commands. (and maybe unlock phone&restart app combo)
My debug buildtype has a packageNameSuffix, and only the debug variant is installed on my device(s). In my Build Variants window, the debug buildtype is selected.
Still, if I try to run a command, it uses the packageName from the release buildtype, which cannot be found on my device(s), resulting in a failed command.
Current "ADB kill app" actually performs "am force-stop" command, instead of expected "am kill" one.
It would be great to support both commands.
I have a case where my AndroidManifest.xml in main is empty, and my actual manifest(s) are in "flavor" folders. This is where my launch activity is declared.
When executing ADB IDEA start (or restart), I get the following error:
ADB IDEA
com.mypackage.name could not bet started on XXX.
ADB Output: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.mypackage.name/null } Error type 3 Error: Activity class {com.mypackage.name/null} does not exist.
It doesn't seem to be able to resolve the launch activity name.
Since Android Studio 2.0 and instant run, app start/restart won't play nice with instant run. Commands will use the apk initially build, when the correct action would be to rely on AS cold start function.
The README.md documents how to use the plugin but not how to build it. I'd like to fork and possibly contribute to the project but I'm new to plugin development, so a quick 1-2-3 cookbook style introduction on how to build the project would be nice.
I use Android Studio from the Cannary Channel and since I moved to 2.1
start and restart are not working anymore
Greetings
Thanks for the great plugin Im working with an app that store local data so when I have to test something speed up the deleting process. Very usefull, thank you so much.
Can you please add a shortcut for closing the ballons. This way we can get a visual confirmation about the executed task, but also an quick and simpl way to close them,
Thanks,
When more than one device Device Chooser doesn't show up any. IDE throws internal error:
com.android.tools.idea.run.LaunchCompatibility.canRunOnDevice(Lcom/android/sdklib/AndroidVersion;Lcom/android/sdklib/IAndroidTarget;Ljava/util/EnumSet;Lcom/android/ddmlib/IDevice;Lcom/android/sdklib/IAndroidTarget;)Lcom/android/tools/idea/run/LaunchCompatibility;
java.lang.NoSuchMethodError: com.android.tools.idea.run.LaunchCompatibility.canRunOnDevice(Lcom/android/sdklib/AndroidVersion;Lcom/android/sdklib/IAndroidTarget;Ljava/util/EnumSet;Lcom/android/ddmlib/IDevice;Lcom/android/sdklib/IAndroidTarget;)Lcom/android/tools/idea/run/LaunchCompatibility;
at com.developerphil.adbidea.ui.MyDeviceChooser$MyDeviceTableModel.getValueAt(MyDeviceChooser.java:421)
at javax.swing.JTable.getValueAt(JTable.java:2717)
at com.intellij.ui.table.JBTable.getRowHeight(JBTable.java:139)
at javax.swing.JTable.getRowHeight(JTable.java:994)
at javax.swing.JTable.getCellRect(JTable.java:2937)
at javax.swing.JTable.valueChanged(JTable.java:4698)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:164)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:211)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:405)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:415)
at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:459)
at com.developerphil.adbidea.ui.MyDeviceChooser.refreshTable(MyDeviceChooser.java:295)
at com.developerphil.adbidea.ui.MyDeviceChooser.access$600(MyDeviceChooser.java:67)
at com.developerphil.adbidea.ui.MyDeviceChooser$6.run(MyDeviceChooser.java:274)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:332)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:734)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:569)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
at java.awt.Dialog.show(Dialog.java:1082)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:778)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1614)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1571)
at com.developerphil.adbidea.adb.AdbFacade.askUserForDevice(AdbFacade.java:120)
at com.developerphil.adbidea.adb.AdbFacade.getDevice(AdbFacade.java:91)
at com.developerphil.adbidea.adb.AdbFacade.executeOnDevice(AdbFacade.java:51)
at com.developerphil.adbidea.adb.AdbFacade.clearDataAndRestart(AdbFacade.java:47)
at com.developerphil.adbidea.action.ClearDataAndRestartAction.actionPerformed(ClearDataAndRestartAction.java:10)
at com.developerphil.adbidea.action.AdbAction.actionPerformed(AdbAction.java:13)
at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:746)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:734)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:569)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
The change notes say NoSuchMethodError is fixed on 1.2.3 build. And It actually did, but on 1.5 Beta. After upgrading to RC1 its broke again
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.