My apps can"t show any logs - android

While developing apps with Android Studio
No Filters show all the system log except my app
My apps show nothing
How to figure it out?

Oky, I have found the answer :In Android studio 1.0.2 or later: you should enable ADB integration through Tools -> Android, before run your app .

Related

How to install app on device without running it automatically using Android Studio

I need to install an app on a physical device from Android Studio without it starting automatically because I need to ensure the device is completely isolated from all outside networks, etc. when I launch the app on the phone.
I did some research but could only find the following two irrelevant posts:
Installing Android app on device from Android Studio - Irrelevant because it doesn't specifically ask how to install without automatically launching.
Install Android app in Eclipse without running it - Irrelevant because it asks about Eclipse instead of Android Studio.
I found the answer at https://developer.android.com/studio/run/rundebugconfig#general-tab .
Steps to install app on device without running it automatically using Android Studio:
Go to Run > Edit Configurations
Find the app you want on the left side, for example, a common one is under "Android App" and it's called "app"
On the General tab, find the Launch Options section and under Launch change from the default (which is "Default Activity") to "Nothing"
note: assumes Android Studio Arctic Fox | 2020.3.1 Patch 1
The option "Nothing" is defined as follows in the documentation link above:
Don’t launch anything when you select Run or Debug. However,
if your app is already running and you select Debug, Android
Studio attaches the debugger to your app process.

App not installing in Emulator, showing "No Debuggable Processes"

I'm building an app in Android Studio. After some time the app stopped reflecting the progress of the building development. I then uninstalled the app from the emulator and it has not installed although build is successful every time. I built the apk for the app and dragged it to the emulator. App is installed but does not start. Is there anything to make it work?
Have done the following:
enabled and disabled Instant Run
enabled and disabled ADB integration
restarted Android Studio added debug{debuggable true} to buildTypes in the app gradle even though it is not advisable
Device Monitor says "ADB rejected shell command (ls -l /)" and "Adb connection Error:EOF"
Thank you
PS:
Android Studio version 3.0.1
Check "minSdkVersion" in App Gradle. if it is less than the Emulator which you have then it will not install or run on it. Make sure "minSdkVersion" should be greater than or equal to Emulator API level.
In Android studio Go to "Build Variant" tab and then change your application build Varian to Debug.
Finally solved it. Thanks to Andy Boot's answer to this question. In short:
I went to Run->Edit Configurations->Android App->app
The Launch droplist had 'Default Activity' selected. I changed that to 'Specified Activity'
I then filled in 'MainActivity' in the Activity field, which has the 'LAUNCHER' intent in the Manifest file.
And that got my app running once again on the emulator ;)
Thanks, everyone.
Do the following if you are facing like Gradle Build finished successfully while running app but app is not installed in Mobile or Android Emulator then follow the steps
In 3rd image 'Deploy' and 'Launch' options should be selected as shown in picture. Apply settings and click OK. YOU DONE.. HAPPY CODING.

Problems running app on actual device

OK, please take it easy on me, I am new to the whole Xamarin community. I have built a simple calculator app using MVVMCross. When I run the app in an emulator everything works great. It still needs some UI attention, but functionally it all works. When I go to archive it and make an install on my phone, it installs just fine. The issue is when I go to run it. As soon as it opens I get an error message. "Calculator.UI.Droid has stopped" Open app again. I have gone through everything I can find online to do this and nothing is working.
Here is my setup:
Visual Studio 2017 Community with latest updates
Windows 10 with latest updates
Latest Java SDK
Project Properties:
Compile using Android Version 7.1 (Nougat)
Minimum Android Version 5.0
Target Android Version 7.1
Use Fast Deployment - false
Generate one package (.apk) per selected ABI - unchecked
Enable ProGuard - checked
Linking - SDK and User Assemblies
Android Phone:
Google Pixel 2 with latest updates.
Any help would be appreciative. Just let me know if you need more information. Thanks in advance
I myself are also using Xamarin, and quite often I get this problem, most times it is related to the code, so please make sure that's the case.
comment out your calculator stuff, and try running the basic app on your physical device. if that works try to find the problem, idk if you can use breakpoints because your problems happens on boot.

Error running app: Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled.

If the "Error running app: Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled." issue occurs while using the latest Gradle Plugin & Latest Android SDK. You can use the below solution as mentioned in the screenshot
In your gradle file just enable 3 options as per the diagram (default always all options will be enabled).
This solution weirdly worked for me.
I don't know it is studio issue or something else with Gradle plugin. But Some one have better solution or exact solution please share across.
Enable your ADB Integration.
Go to Tools --> Android --> set checked in Enable ADB Integration
Go to -- app-->Edit Configurations-->Launch options
In Launch select --> Specified Activity
apply then press ok button.
now you may run the program
Firstly, If the Android Device Monitor is opened, close it and then select "Enable ADB Integration"
Hope this helps someone:
For me what fixed it was closing the Android Device Monitor
I could not Enable ADB Integration until then.
I ran into this error after opening my Android Studio 2.3.3 on March 25, 2019. The last time I had accessed my projects was earlier in 2018. I started Android Studio 2.3.3 and opened projects that I had previously created and ran fine. A bunch of stuff was broken. Apparently parts of Android Studio or dependencies, or related packages, had been updated in the background and that broke all my old projects.
Just to get Gradle to sync on opening projects, I had to download and install Android SDK 27. Fumbled through a few more issues which I will omit. I didn't do a good job of recording them and they are not pertinent to this question.
Finally got to the point where I could run my project and the emulator launched just fine but Android Studio wasn't able to start the project. It just sat there waiting. Closed everything and restarted. Tried running the project on an emulator again and I got Error running app: Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled.
Here is a screen shot of how the error displayed:
I referred to some of the other answers to this problem posted on this thread. Android 2.3.3 settings dialog is a little different than the newest Android Studio.
To fix the problem I went to "File -> Settings -> Build, Execution, and Deployment -> InstantRun". At the top of the dialog is a check box for "Enable Instant Run to hot swap code/resource changes on deploy. I attached a screen shot of my settings.
I closed and restarted Android Studio. Opened my project and clicked the run button. The emulator started and the compiled app launched. Problem resolved for me.

Android Device Window Chooser not working after updating device

I've always used my android phone for development but after installing the last software update on my device (4.2.2) it suddenly stopped working and would appear offline in eclipse's Device Window Chooser.
I'm not able to send applications to it for testing or access it with the adb-shell. I have developer options turned on and debugging mode enabled. I'm using Eclipse Helios on Ubuntu linux.
When I launch Eclipse the following window will show up
and after clicking on the check for updates I get the following error:
Unable to read repository at jar:file:/home/matteo/Downloads/ADT-18.0.0.zip!/site.xml.
error in opening zip file</code>.
Last thing, if I open Window->Preferences and go on Android I see this:
This question is not a duplicate of Android device chooser - My device seems offline (of which I read every single line). It's a request for some rigorous solution from the community. In fact non of the proposed solutions helped me in getting my device to appear online, as you can see in the attached snapshot.
Please help me! Any suggestion will be very appreciated! ;D
Ok open sdk manager /sdk/tools/android now download the sdk for your new android version. In my case it was API 17. Once its done you should be ready.
If you still got some issue be sure that you have the last version of the ADT installed. Installing it again http://developer.android.com/sdk/installing/installing-adt.html
Now you should be ready to go.

Categories

Resources