monodroid 4.6 breakpoint not hit - android

I'm using Mono for Android version 4.6.00049 with Visual Studio. I am debugging on a USB-attached Google Nexus 7.
I was able to break into the app being debugged. After installing the latest Mono for Android, debugging seems to have become unstable.
At first I wasn't able to debug my application at all: When starting the debugger, the application started on the device but Visual Studio did not enter into debug mode. After some seconds the app shut down on the device.
I followed an advice here on stack overflow to switch off "Use Fast Deployment" in the application project settings' "Mono Android Options" page.
Now Visual Studio enters debug mode and the app is not aborted on the device. Yet no single break point is being hit.
I read a couple of answers here on stack overflow all related to various settings on the "Mono Android Options" project property page. I realized that several settings lead to somme awkward "package tv.ouya.console.api does not exist" error when trying to rebuild the solution.
Please help.
Thx
Christoph

Related

Instant run is disabled for the current variant

I have seen many questions like this, but they didn't solve my problem.
I use IntelliJ IDEA for developing Android applications. Whenever I run an app and deploy it to a device, whether it is a physical device or an emulator, the instant run option always remains greyed out, even if the app is already running. When I hover over the icon, the cursor tip shows that Instant run is disabled for the current variant. See this :
In the IDE errors panel, it shows this :
I had already used this feature in Android Studio without any problems, but I can't find the solution to this problem in IntelliJ. Please help me solve this problem. I am using the latest version of IntelliJ IDEA.

Android Studio 3.5 deploy issue on my smartphone

I have just updated my Android Studio to 3.5 and I am starting to use the new "Apply Changes" feature. I can deploy my apps without problems using AVD, but when I use my smartphone (Galaxy S9+ with Oreo) the process keeps crashing and all the times I have to kill manually the app and click Start.
I've already tried to create a new project, kill all the apps, plug & unplug the USB cable and restart my device. I tried also Invalidate cache/restart and clean project.
This is the error that the IDE gives me:
E/zygote64: Bad JNI version passed to GetEnv: 805372416
E/studio.deploy: Error retrieving JVMTI function table.
Changes were not applied.
We were unable to deploy your changes: MISSING_AGENT_RESPONSES
Thanks for your help
After contacting the Google Team they have opened a new issue, here's the link if you want to stay updated: https://issuetracker.google.com/issues/139942372
UPDATE: Google has marked this issue as fixed, I think that in the next update everything will be fine.
If this is happening with a plain project, my guess is that there is some incompatibility between your device and the "Apply Changes" feature in Android Studio 3.5.
This issue seems to match your symptoms. Keep an eye on it, and with luck this will get fixed in Android Studio 3.5.1, either by fixing the IDE or at least detecting that "Apply Changes" will not work and reacting better.

Debug.waitForDebugger(); not working in Android studio

When I worked with Eclipse, I used Debug.waitForDebugger() to enter debug mode in hard to reach classes like services.
However, since I moved to Android Studio, I was not able to get Debug.waitForDebugger() to work.
When I add it and run the app, it does not enter debug mode at all.
Does anyone know how to make Debug.waitForDebugger() work in Android Studio?
Quoting from AOSP issue 76040 https://code.google.com/p/android/issues/detail?id=76040 -
"DDMS in Eclipse will monitor apps run on a device. When apps show up in ddms in "waiting-for-debugger" mode and the app name (its package) match the package of an app opened in the workspace, then ADT will automatically connect the debugger configured with that particular app.
We should do this in Studio as well. Probably after 1.0 though"
Up until today this problem has not been resolve yet in Android Studio.
try android.os.Debug.waitForDebugger();
Use the emulator/device entries under "Settings>Development Options" as advised here

How to debug Android App in Exclipse?

Ok.
So while this isnt a programming question.
I wanted to know how do people debug apps?
How do you view log cat, and where these exceptions are thrown etc?
And do I need to run the app on the emulator to see all the stuff, or is there a way to view this after running the app on my phone(while not being connected to the computer)
Links to plugins and tips would be really helpful, as im gonna start work on my next game, and while the first one works fine, had a lot of problems while debugging.
Setup: download the Android Developer Tools (ADT) plugin for Eclipse from here http://developer.android.com/tools/index.html
To debug:
Connect your phone to PC via USB
Open Eclipse, set breakpoints
wherever you need
Run -> Debug to relaunch your app in debug mode
Use the Debug perspective, see:
http://developer.android.com/tools/debugging/debugging-projects.html

Android development - can Eclipse / AVD run error free?

I am new to Android development and Eclipse. I have been given an Android app and asked to make some simple changes to it. I can build the project and run it in the emulator, but I see some errors in the LogCat window in Eclipse.
I put aside the app I was given and wrote the Hello World app, following the Hello World tutorial on developer.android.com. With this simple app, I was surprised to see many errors and stack dumps in the LogCat window. I closed Eclipse and re-launched it. After waiting for Eclipse to finish initializing, LogCat was empty. Then I started the Hello World app by clicking the run button. After a while entries appeared in LogCat, including many errors.
With such a simple app, copied from the tutorial, I am guessing the errors arise from the development environment and/or virtual device rather than from the app itself, but I would like to be able to run apps without errors.
Is it a reasonable expectation to be able to run Android apps from Eclipse on an AVD without any errors? Or is it the state of the art that the development environment logs many errors and dumps stack traces even when everything is running "normally"?
If it is reasonable, I will pursue each error until I have cleaned up my environment and application. I would prefer this, as I would then know that if errors appear as I continue development, they arise from my application and must be fixed. On the other hand, I can't spend months developing Eclipse and the Android SDK. If I have to learn to live with logs full of error messages, I'll just ignore them unless something crashes.
Note that the Hello World application runs as expected - it appears to be working despite the errors.
I am running Eclipse Indigo SR2 and Android SDK ??? (I don't see a version number for the SDK - the installer is r18 and SDK Manager says there are no updates available) on Windows 7 Professional, 64bit. I am testing with Android 4.0.3.
Use either:
adb com.your.package:v
or in log cat on the side button (You may need to make this visible by pressing the button with two rectangles in it in log cat) press the plus button and then add an application filter

Categories

Resources