How do I debug my Android app on Samsung - java

I am trying to debug my first app. I have a Samsung Galaxy S3 with Android Jelly Bean (I'm a Windows user) and I have installed the latest version of Kies and have installed all required drivers for my device.
Following the steps to debug in the Android Getting Started tutorial, I have not been able to successfully debug my app on my phone or in an emulator.
Actually I don't really care fo the emulator at this point since this app is just a hello world app. I need to see it on my device but I can't and I don't know what I'm doing wrong, if anythin.
When I hit the debug button in Android Studio, and select my Device as the device to debug on from the popup dialog, Android Studio then displays the following error:
Installing myapplication
DEVICE SHELL COMMAND: pm install -r
"/data/local/tmp/myapplication"
pkg: /data/local/tmp/myapplication
Failure [INSTALL_FAILED_INVALID_APK]
I have searched this error but all the solutionts I have seen are telling me to do things I've already done!
How can I debug an app on Samsung GS3 using Android Studio?

Whats your package name ?
You must have one "." at least

Related

Pre-launch reports UiAutomation not connected error

when I try to upload my APK to android market I get a pre-launch reports with the following error. It only happens with Samsung galaxy S9.
java.lang.IllegalStateException: UiAutomation not connected!
at android.app.UiAutomation.throwIfNotConnectedLocked(UiAutomation.java:1043)
at android.app.UiAutomation.waitForIdle(UiAutomation.java:647)
at android.support.test.uiautomator.r.a(QueryController.java:36)
at android.support.test.uiautomator.r.c(QueryController.java:32)
at android.support.test.uiautomator.r.a(QueryController.java:9)
at android.support.test.uiautomator.y.g(UiDevice.java:91)
at androidx.test.tools.crawler.platform.uiautomator.UiAutomatorScreenStateBuilder.getCurrentActivity(UiAutomatorScreenStateBuilder.java:39)
at androidx.test.tools.crawler.platform.uiautomator.UiAutomatorStateExtractor.getCurrentActivity(UiAutomatorStateExtractor.java:34)
at androidx.test.tools.crawler.platform.hybrid.HybridStateExtractor.getCurrentActivity(HybridStateExtractor.java:31)
at androidx.test.tools.crawler.controller.remote.RemotePlatform.handlePerformActionMessage(RemotePlatform.java:25)
at androidx.test.tools.crawler.controller.remote.RemotePlatform.access$300(RemotePlatform.java:91)
at androidx.test.tools.crawler.controller.remote.RemotePlatform$ControllerMessageHandler.handleMessage(RemotePlatform.java:8)
I don't think this is related to my code because I run the app without problems in the Android Studio emulator.
Any help with this?
Thanks for your help.

Instant run does not work

I'm getting this issue in android studio 2.3 when I click on run:
03/09 19:02:36: Launching app
$ adb shell am startservice
com.a890m.s/com.android.tools.fd.runtime.InstantRunService
Error while executing: am startservice com.a890m.s/com.android.tools.fd.runtime.InstantRunService
Starting service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.a890m.s/com.android.tools.fd.runtime.InstantRunService }
Error: Not found; no service started.
This issue is only in Android Studio 2.3 which is still open in google issue Tracker
You can resolve it (for time being not a permeant solution because Instant run is needed) by disabling instant run in your android studio.
goto-> Android Studio -> Preferences -> Build, Execution, Deployment -> Instant Run
I get this error before and the solution that works for me is to Try unplug and plug the cable again and see if it works
This is happening for some specific devices because some manufacturers have customized their devices and added some sort of "auto-start" blocker. For affected Asus devices, for example, you can fix this issue by enabling Auto-start for your app with Asus's Auto-start Manager. See this page for details: https://www.asus.com/support/faq/1013752
But different manufacturer seems to do this differently. For example, for LeEco devices, you can allow "auto-launch" under settings. See this issue (https://github.com/openstf/stf/issues/407#issuecomment-247852532) for info on how to enable auto-launch for your app.
You can Google how to turn off such autostart/autolaunch feature for your specific device to get Instant Run to work. You can also just use the emulator.
Hope that helps.

Android Studio genymotion emulator not running

I'm using Genymotion along with Android Studio using the plug-in and no matter what I do it does not allow me to run the app using the Genymotion emulator.. it gives errors like this:
Waiting for device.
Target device: genymotion-samsung_galaxy_s4___4_4_2___api_19___1080x1920-192.168.56.101:5555
Uploading file
local path: C:\Users\zd\AndroidStudioProjects\funfacts2\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/Taha.funfacts2
Installing Taha.funfacts2
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/Taha.funfacts2"
WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.
pkg: /data/local/tmp/Taha.funfacts2
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
This is running on just a test app that outputs Hello World on the screen, with some basic formatting.

requires unavailable shared library com.google.android.glass;

I have tried to install and run the compass sample project from
glass developers site.
I get the following error
when try installing on non-rooted devices (nexsus4, galaxy note2):
requires unavailable shared library com.google.android.glass; failing!
I have tried to remove this from the manifest,
but now the apk seems to be installed but nothing is really added to the device
[2014-01-21 15:29:33 - compassApp] Uploading compassApp.apk onto device '4df1250c1d449f4d'
[2014-01-21 15:29:33 - compassApp] Installing compassApp.apk...
[2014-01-21 15:29:46 - compassApp] Success!
[2014-01-21 15:29:46 - compassApp] /compassApp/bin/compassApp.apk installed on device
[2014-01-21 15:29:46 - compassApp] Done!
As far as I know you can't run glassware on a standard Android device.
Hence glassware requires api's found only in Google glass
I found a workaround to run glassware on an Android device. This will add the required api's to your Android device through apk's. Haven't tried it myself.

Android Avd running with errors

I have installed Android 4.3 AVD bundle on Ubuntu 12.4 LTS. When I start AVD it shows too many errors.
Starting emulator for AVD 'AVD_for_3_7_FWVGA_slider'
Failed to load libGL.so
error libGL.so: cannot open shared object file: No such file or directory
Failed to load libGL.so
error libGL.so: cannot open shared object file: No such file or directory
emulator: emulator window was out of view and was recentered
How to fix these problems?
I have replace android emulator with Genymotion. Genymotion is better than android emulator for testing game application here

Categories

Resources