I've started with Xamarin and Android using Visual Studio 2013.
When I start debugging the android app, it builds, deploys to device and then debugging in Visual Studio stops. I can't hit any breakpoint. App is working in device, but I cannot debug it.
Am I missing something?
I've tried various emulators and a physical android device but debugging doesn't work in any of them. It just act like I have stopped it.
Debugging the same solution in Xamarin Studio works, I just can't get it working in Visual Studio.
I was having the same problem and I found this workaround with Hyper-V in Xamarin's documentation: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/debug-on-emulator/visual-studio-android-emulator/
TL;DR; Open Hyper-V Manager -> Go to settings on your emulator -> Go to processor settings -> Select Compatibility -> Mark the "Migrate to a physical computer with a different processor version" checkbox -> Done! (At least for me) VS is now debugging my Android App
Another reason why Visual studio can't debug Android Xamarin app with a Hyper-V is due to you don´t have 'Deploy" option check in android project.
Steps: 1) Enter in "Solution properties" 2) Select "Configurarion Properties" 3) Check "Deploy" in Android project.
Make sure you are running on Debug mode (on target).
Then, check the Properties of the App Project and see if it's using the Xamarin debugger instead of the VisualStudio Debugger.
Enter in "Solution properties"
Select "Configurarion Properties"
Check "Deploy" in Android project.
Open Hyper-V Manager
Go to settings on your emulator
Go to processor settings
Select Compatibility
Mark the "Migrate to a physical computer with a different processor version" checkbox
This will also happen if you don't have any activity marked as your main launcher activity:
[Activity(
...
MainLauncher = true,
...)]
public class MainActivity ...
Easy mistake to make if you're shifting code in from a prior project and the prior project is using a splash activity and your new project is not yet doing so.
Go to property of app project then click android option and checked checkbox in debugging section.then run again.
For anyone who might still need help. Also make sure the build and deploy checkbox's are checked in the configuration manager. .
In my case, after some investigation, I saw I was having this warning: "Failed to read .android.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. 2>Mono.Cecil.Cil.SymbolsNotMatchingException: symbols were found but are not mathing the assembly"
The solution was to disable linking:
Right-click the Android Project -> Properties -> Android Options -> Under "Linker properties", set Linking to None (see image below)
Got this from TedFalasco's answer on this post.
Hyper-V manager can't be installed on Windows 7 (only the management tool gets installed) so if you get this problem, following those steps don't help.
Here is the thing that worked for me and it's mentioned here as an answer but hasn't been marked up or marked as an answer. This is actually the best and easiest solution. nothing else worked for me.
In Visual studio, make sure you choose the solution file (not project files) in the solution explorer. Then go "Project > [project]properties"
in the left pane choose "Configuration Properties > Configuration"
Now check the Deploy feature if possible. Only deployable projects have the option.
This saved my life and I almost gave up on Xamarin. I really hope this helps others like me.....
In my case, the warning was self-explanatory:
Set the debugging information to Portable in the Visual Studio project property pages or edit the project file in a text editor and set the 'DebugType' MSBuild property to 'portable' to use the newer
In other words: Right click on project => properties => build => click on advanced => set the debugging information to portable.
I have tried every answer and none of them worked.
Here is what I did to make it work again:
Plug your physical android device to the computer. Android device must have Developer options enabled.
Choose your android device in Visual Studio.
Run app in Debug mode. Your app should appear on your android device.
Unplug your android device from computer.
Try running your app in android emulator. For me Debug option starts working again.
Related
After making a few changes I am getting an error
Session 'app': Error Installing APKs
According to some it is because of Instant Run.
On the latest Stable Android Studio 3.0, under Build, Execution, Deployment I don't have any option for Instant Run, even checked in the settings search. Any clue where I might be able to disable it?
Update 1: Tried reinstalling. No change.
Build number 171.4408382
Update 2: Gave reset a shot https://stackoverflow.com/a/19397632/1926621 still nothing.
Update 3: Not a duplicate. Must be something in the settings. A complete clean install/reset did it.
Screenshot of what I see:
Go to Android Studio Settings or Preferences (for MAC) -> Build,Execution,Deployment -> Instant Run.
Then deselect the "Enable Instant Run" checkbox at the top.
Linux Screenshot:
Windows Screenshot:
For Mac go to Help in MenuBar and type 'preferences'
or,
go to 'Android Studio -> Preferences' in MenuBar
Mac ScreenShot
Instant Run is not a feature of Android Studio 3.5 (and later) any more and so cannot be disabled.
In case you find an old guide recommending to disable it, you can ignore this instruction.
See here 1 and here 2.
Just make sure you go to Android Studio -> Preferences instead of File -> Other settings -> default settings.
Instant run should be there.
Instant Run is removed from Android Studio 3.5 and added Apply Changes which works for Android 8 and above please follow the link for more https://android-developers.googleblog.com/2019/08/android-studio-35-project-marble-goes.html
Finally fixed!
As other users on Linux and such saw the Instant Run option in the settings, I tried reinstalling and resetting the installation, following https://stackoverflow.com/a/19397632/1926621
Removed all old settings, and installation of Android Studio( kept the SDK files). Changed the path. Opened the same project, and the options were now there!
Easiest/Laziest option for For mac would be CMD+SHIFT+A Search for instant run, click on relevant suggestion and uncheck the checkbox
Instant run is not a feature in Android Studio Bumblebee anymore.
Trying to install app on real device following instructions:- http://developer.android.com/tools/device.html. At end Android Studio giving error:
Session 'app': Error Installing APK
I guess the problem probably can be in my android device(it is chinese Doogee X5). It does not have a given USB Vendor ID in developer docs so I decided to follow instructions with random vendor ID from HTC.
I'm sure there is a way to run application on any android device, but yet I didn't find an answer on how to do that.
I'm running through Linux Ubuntu 14.04 LTS
Edit:
In newer Android Studio versions you can re-sync the project using this button:
For older versions:
Open Gradle window (on the right side in Android Studio) and click on the refresh button.
However it is not a 100% sure fix.
Solutions for other cases:
Open terminal window and type "adb kill-server", then type "adb start-server". Usually after a few hours of inactivity, adb used to disconnect the device. (If you don't have the sdk/platform-tools in the PATH environment variable, then you should open a terminal in that folder)
One tip if these solutions don't help you:
If you open the Event Log window in the right bottom corner of Android Studio, you can see a detailed error message.
Other edge case
If you see this error: INSTALL_FAILED_INVALID_APK:... signatures are inconsistent.
Then unfortunately a gradle refresh isn't enough, you have to go to Build -> Clean Project and then Run again.
Issue with Android emulator
If you want to deploy the APK to an Android Emulator and you see the "Error installing APK" message, your emulator may be frozen and need restart.
Turning off the Instant run removed my error for Androdi Studio 2017.03.03 v2.3
You have to enable Developer options and enable USB Debugging:
Go to the settings menu, and scroll down to "About phone." Tap it.
Scroll down to the bottom again, where you see "Build number." (Your build number may vary from ours here.)
Tap it seven (7) times. After the third tap, you'll see a playful dialog that says you're four taps away from being a developer. (If only it were that simple, eh?) Keep on tapping, and poof, you've got the developer settings back.
http://www.androidcentral.com/how-enable-developer-settings-android-42
Inside Developer Options, enable USB Debugging
Try using a different version of Gradle(stable version).
To summarize:
Check your gradle file for debuggable false/true
Invalidate caches & restart
Check your install location
Restart adb
I fix this by delete the build folder then run project again
Make sure that your device is not out of Memory!
I changed my USB port and that fixed it for me.
Make sure that project name doesn't contain special character.
Another possibility may be the USB driver on your PC. In my case, switching from my 3.0 USB port to my 2.0 port fixed the problem.
Ensure you android device has enough memory to install the app. Sometimes it so happens working with multimedia app where the device storage keeps on increasing and you keep wondering about the error.
Therefore, free up some memory and try installing again!
A bit late to the party, but be sure that you are trying to build a proper build variant. It sometimes happens to me that when I update AS, the build variants are totally messed up, so instead of building the "debug" variant I am actually building the "release" variant, which outputs apk to a different location (not to app/build directory, but to app directly) and I get the following error:
The APK file /path/to/file/app.apk does not exist on disk.
Error while Installing APK
To fix this just open the menu in left bottom corner, click on "Build Variants" and select the debug variant (it might have a different name, depending on how many modules/flavors or custom gradle build types you have).
Try to remove the .idea folder and .gradle folder, then click Sync Project with Gradle Files, when the process finished, try to run app again.
Hope it works.
just press Build button from menu bar and then press build app wait for it finished then press build APK and then run your emulator, it will work
Usage of easily changing variable value will often happen in build.gradle(like the Date)
In my case with Android 8.0(Oreo), no one of this solutions worked!
If you have more than 1 user, then you should go to Settings->Applications->All Applications->Find the application and uninstall for all users!
After this steps, it worked!
Just rebuild and clean project, then run project.
This happens because the gradle is not synced with the app. Go to : Tools -> Android -> Sync Project with Gradle files. Re-run and you should be good to go.
Nothing above helped me. The fingerprint dialog did not appear. I checked another android device and the dialog appeared and debug was possible.
So the problem was on device side not on computer side I made reset "to factory settings" on device and this helped me.
I fixed my issue, simply by using :
Build->Clean Project
then
Build->Rebuild Project
I had this same issue and none of the other solutions worked for me.
Although no errors were shown nor expanded upon in my IDE GUI, I opened up a second Android Studio window window with a different project and noticed in the bottom that the "Event Log" showed an error in a different window, but not in the project I had opened. The issue stated was:
Error: INSTALL_FAILED_CONFLICTING_PROVIDER
Which lead me here - Install shows error in console: INSTALL FAILED CONFLICTING PROVIDER :
I had this FileProvider labeled in the manifest:
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="myapp.sameonehere.android.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths" />
</provider>
Which I had copied from another project and forgotten to rename the 'authorities' String in. After changing it to something unique, it ran without issue.
Make sure you don't have any conflicting authority Strings like in my example.
Also, if no errors are showing up, try opening a second project and see if the "Event Log" shows errors in that location instead.
Uninstall the app, and re-install and it should work!
Go to avd manager and click on Wipe Data of the device you want to run. Worked for me. The size of device on disk will reduce after wiping the data. I hope it helps someone.
You have to enable Developer options and enable USB Debugging:
1:Go to the settings menu, and scroll down to "About phone." Tap it.
2:Scroll down to the bottom again, where you see "Build number." (Your build number may vary from ours here.)
Tap it seven (7) times.
After the third tap, you'll see a playful dialog that says you're four taps away from being a developer.
Keep on tapping, and poof, you've got the developer settings back.
My issue was solved by
Clean --> ReBuild --> Run
and in my case it was because i accidentally deleted the project folder and when i clicked ctrl+z to restore something wrong happened.
My problem was that I didn't accept the connection from the computer after turning on remote debugging. Once I accept the mac address, it went away. Silly mistake, but I didn't see the dialog box the first time. Worth a quick check if the others don't resolve the issue. But likely only a problem the first time you set up a phone.
What worked for me is deleting the app from the emulator (which was an app built from an older commit) and re-running from Android Studio.
It was written above: in my case it was just out of memory on device storage. Add more empty space - and error will disappear
I tried invalidating cache, deleting build folder and gradle sync. Also, I couldn't uninstall because the app is not visible on device. So I tried uninstalling through ADB and it worked.
adb uninstall <package_name>
If you are using android emulator, try changing a device.
I've been trying to learn how to use Android Studio but when I attempted to run one of the sample programs I get this error message:
Installation failed with message null.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
I've tried to do this on 5 more sample programs and all of them give me this error. Does anyone know how to solve this?
I'm Using Redmi 3s mobile. I got same problem.
Solution: This issue is common on Xiaomi phones running MIUI 8. This can resolved by turning off MIUI optimizations from Developer Options in Settings app. Then recompile the app and voila it works.
Settings --> Additional settings --> Developer options --> Turn Off MIUI optimization
Or
Settings --> Developer options --> Turn Off MIUI optimization
I got the same problem , just choose clean project then rebuild project from build menu , it's solved my problem
Disable Instant Run
Preferences > Build, Execution, Deployment > Instant Run
Source: comment by #user77309
Path: Android Studio Preference / Build, Execution, Deployment / Instant Run
Go to Android Studio Preference (for Mac) or Settings (for windows)
Choose Build, Execution, Deployment tab
Choose Instant Run
Uncheck Enable Instant Run to hot swap code/resources changes on deply (default enabled)
It works for me!!
Go to Settings > Applications. Probably you have the app still installed for other users (I had the same problem with a Moto G, I did not see the app among other apps, but it still was among my apps in Settings). Try to find it and remove for all users.
If the problem is this one you will find the app at the end of the list (in Settings > Apps > All)
All the apps marked as "Not installed" are still there and you can not install the same apps with Android Studio until they are there
This happens when your app is using any library and there is also an app installed in your device that is using the same library.
Go to gradle and type:
android{
defaultConfig.applicationId="your package"
}
this will resolve your problem.
INSUFFICIENT_STORAGE
Solution:clean you phone storage
Pay attention Android Studio log:
open: Permission denied
open: Permission denied
pkg: /data/local/tmp/com.example......... Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
Step 1: Go to "Setting" → find "Developer options" in System, and click.
Step 2: TURN ON "Verify apps over USB" in Debugging section.
Step 3: Try "Run app" in Android Studio again!
and you should also TURN ON following fields inside "Developer option" .....
1: TURN ON ->"Install via USB" field
Some solutions:
1 Build -> Clean Project
2 Build -> Rebuild Project
3 Built -> Make Project
4 Remove your application from device and try install again
5 Mb you have some problems with actual version of yours app(try to pull actual branch). Also you can check on your emmulator, if yours app is running.
6 Try to use 1,2,3,4 solutions.
The solution for me was : (in a Huawei)
Android Studio -> Build -> Clean Project
In the phone -> go to Phone Manager -> Cleanup and Optimize
I had the same issue, and found that it was the USB cable I was using that was causing the issue.
Changing the USB cable fixed the issue, and I could successfully install the app afterwards.
In real device do below tasks..
1.clean all cache memory.
2.check the internal storage space (if space is just 500 mb free, then remove some data or app in the internal storage maintain at least 1 gb space.
3.again do clean all cache memory.
4.now goto android studio or eclipse click on app goto run select the device and run
I hope app will install and it will run..!!!
Uninstalling from AVD worked for me. After reinstalling it worked
For the 1st time installation of apps in a device, enable developer option which is mentioned in the above post. For facing problem while installing the apps from the tool, follow the below steps....
By enabling an option in settings, you can install apps directly. Error will disappear.
For MI users: Go to Settings-> Additional settings-> Privacy-> Unknown sources (make it enable)
For Normal Users: Go to Settings-> Security -> Unknown sources (make it enable)
Simply closing Android Studio (and emulator) then re-opening fixed it for me. Once I ran the app again, the apk re-installed successfully and app ran properly.
Recently I also find the same problem and there some reasons behind this but I am giving you 3
In your phone in the setting go to "Developer Option" and enable USB debugging
Also, check the "Install via USB" is also on in Developer Option itself.
In Android Studio go to File -> Settings -> Build, Execution, Deployment -> Instant Run and uncheck the Enable Instant Run
It must work.
Happened to me as well:
At the first time, it says-
Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
At the second time, it says-
DELETE_FAILED_INTERNAL_ERROR
This because of the new 'com.google.android.gms' version 8.3.0
Changing it back to 8.1.0 solved the problem in my case
I was having the same error, but i fixed it after reinstalling the HAXM. This problem is caused because of the virtual device not starting properly. If your device keep showing on screen "Android" or the screen is black, it have not started yet, you have to wait more for it to start properly, then it shall run. If it is too slow, maybe you should find a way to accelerate the Android Virtual Device (AVD). The Intel computers have the HAXM (hardware-accelerated-execution-manager).
In my computer was not starting because of the HAXM not working, I fixed it by reinstalling the HAXM, downloading it from the intel website: "https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager"
Then i set the HAXM max memory to 1536MB in the installation, for not having the problem of this other post, that you maybe have and i was having too: "HAXM configuration in android studio"
After all done, it worked fine.
android {
buildTypes {
debug {
debuggable true
}
and
In the AndroidManifest.xml file, add android:debuggable="true" to the <application> element.
https://developer.android.com/studio/run/device.html#setting-up
it works for me..
I solved the issue by simply deleting my whole /build folder and rebuilding (menu Build > rebuild project).
This problem cause to me because of the project path .
Y:\Example&SourceCode with & sign
So i change the Project path to another one without special characters. Now It is Fine.
For me it only started working after I rebooted device (Motorola-Nexus-6).
(I also tried to clean, disable "instant run", reopen Android Studio, verified installed applications to be sure there are no clashes, disable and reenable Debug mode in phone, reconnect USB cable)
I have faced this issue since I have upgraded the build tools from 26.0.2 to 27.0.3. Reverting back, clean and rebuild solve the issue.
Also I have degraded the gradle plugin version from 3.1.3 to 3.0.1 as the latest version was overriding the build tools to latest version.
I also got same problem while generating signed APK. Just select APK signature scheme v1, not v2 (introduced in in Android 7.0). If you select v2 scheme it won't work on devices that use Android versions older than 7.0.
if your "versionCode" in build.gradle file is less than the eralier version code then, your app wont install.
Try to install with same "version code" or more than that.
If you do all of things above and still get stuck, just try reopening your Android Studio.
I had the same issue but finally it worked after storage clean on my mobile. May be happen because of insufficient storage
I have a Redmi K20, the following is MI, Redmi specific that I learned in a hard way
How I ended up in the error: I uninstalled the debug app from the phone because my assets were not accessible (maybe I had faulty source code)
Solution (steps that worked for me in sequence):
Uninstall the app
As per suggestion above by #Jayaprakash G and all, I turned off MIUI optimization
I tried finding "Instant Run", but seems missing in Android Studio 3.6.2
MI supports "Second Space", switch to it. You'll observe the app is still there. Again uninstall.
Switch space back to original again. By any chance, if you see the same app in frequently used app in the app drawer, again uninstall.
Try to compile and run the app from Android Studio and let it show in the app phone (Error 3 will be still there, but installation will succeed).
Clean the project, close Android Studio
Start Android Studio, now everything will work as normal without the Error 3
I solve this problem by:
Enable Instant Run
Settings>Build, Execution, Deployment>Instant Run
I just installed VS 2015, the installation was finish (after some fail time caused by the slow network, I run setup again).
I create a project as Android > Android blank project
When I press F5, the build is seem to by success but the deploy is fail, there isn't error message. Tried set Tool->Option->Build->Diagnostic, no result. VS 2015 is pretty new, is anyone met this? How can I fix this?
I bumped into the same, but I started VS2015 as Administrator and solved the problem.
Is any Android Virtual Device running?
Open AVD menu
Launch the device
Wait for it to fully load
Build and deploy
Find your app in device's menu and execute it
Visual Studio gets stuck trying to deploy the app to the emulator or the emulator does not appear as a debug target in other IDEs
If the emulator is running, but it does not appear to be connected to ADB (Android Debug Bridge) or it does not appear in Android tools that make use of ADB (for example, Android Studio or Eclipse), you may need to adjust where the emulator looks for ADB.
The emulator uses a registry key to identify the base location of your Android SDK, and looks for the \platform-tools\adb.exe file under that directory. To modify the Android SDK path used by the emulator:
Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK.
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools in the folder tree on the left.
Modify the Path registry variable to match the path to your Android SDK.
Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.
And yet another recipe of fixing this:
clean projects
remove all bin, obj folders
mark your android-project
as startup
then try to deploy again
As for me, in some cases, if visual studio stucked on project building, it requires pc reboot.
I had the same annoying issue. Going to Options -> Xamarin -> Android Setting and checking Preserve application data/cache on device between deploys solved my problem.
I was facing same issue.
Just reopen visual studio and rebuild your project..and then try to deploy.
Its worked for me!
According to Magnus Grindal Bakken's comment, I found the solution.
1) The installation must have an internet connection to be completed.
Any interruption may cause components to be excluded.
2) You need android emulator. Installing the Android SDK and Visual Studio 2015, is not sufficient, You either need the Microsoft emulator, the android one or another third party emulator (like Genymotion). You also need to ensure that the Xamarin plugins for Visual Studio are installed.
Xamarin for Visual Studio can be downloaded here. Once it is installed Visual Studio will be able to create and run Xamarin projects. Xamarin for VS includes the Xamarin Player for emulation. I think it's even better than Genymotion.
Start emulator via AVD manger ... [start] button (as user m93a suggested).
And next option contains check option "wipe user data". Check it !
It helps me solve this problem. Then deploy or debug the application and all process will works as expected.
I had the same problem with my XF App, it didn't deploy and just one message saying Deployment Failed, internal error....
I solved it. Working on Mac with Xamarin Studio, make sure that the ABI of your simulator is supported by your app.
Xamarin Studio Android project Options
Just run your Visual studio as Administrator mode.
Sometimes the physical Android device gets confused about versions.
On the device, to go settings | Applications Manager | All applications.
Manually delete your application.
Manually delete "Mono Shared Runtime" (don't worry it will reinstall during deploy)
Make any change in your project so it is seen as altered and needing to be recompiled: Add a new blank-line to a .cs file or something.
Build
Debug/deploy
I faced that problem couple hours ago, I tried to deactivate hyper-V and it worked for me.
In the Android App project Properties in Visual Studio I had to go to Android Options>Advanced and make sure the Support architectures had the architecture of my AVD checked.
In my case this was x86_64 (which, by the way, does not have a particularly discovereable method of installation - took me days).
First of all, we can find the error in "Details" when we click "Start" button on "AVD Manager" for "Android_Accelerated_x86". If the error is as follows :
Please ensure Intel HAXM is properly installed and usable. CPU
acceleration status: HAXM is not installed on this machine
So, in this case we need to install "Intel® Hardware Accelerated Execution Manager". It can be downloaded from following link :
haxm-windows_v6_0_6.zip (6.0.6)
Note: After installing Xamarin for the first time in visual studio 2015 i had the same error to run "Android_Accelerated_x86". After installing this accelerated emulator is now up and running.
If the emulator does not even lauch, maybe deploy is skipped.
You cas see this in the output console.
If so, you may have to activate the deploy by checking it in the solution's (not project) parameters.
If the emulator launches but the deploy won't end after minutes, with no error, try the steps described here : https://stackoverflow.com/a/32564067/7505268
That solved it for me.
I had Xamarin Android Player opened while trying to deploy the Android project. This steps worked for me:
Closed Xamarin Android Player
Ran Android project again
in my case I had this problem because "Solution Configuration" was set to Release. I change it back to Debug and I solve the problem
Try one of the following and see if you can get the app to deploy to your device.
Clean and build project/solution
Make sure you have updated all the NuGet packages (Right click on solution and click on Manage NuGet Packages.... Then check in Updates section whether there are any updates)
Make sure you have installed all the necessary SDKs from the Android SDK Manager
Check whether you have selected the correct project as the startup
Check if you have set the correct path for Android SDK and NDK locations
Make sure you have checked Deploy for your selected project from Build -> Configuration Manager
Well there can be many reasons,one of them could be that from the Build section in your toolbar,if you check the configuration manager there will be project names that are available in your current solution all you have to check is if the deploy checkbox is checked or not.If not kindly check it and things will work just fine
This worked for me:
Making sure that Define DEBUG constant is checked.
Using Log.Info("yourTag-AnyString", "Error before/after ");
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
Log.Info(tag, "Error before Layout");
SetContentView(Resource.Layout.Main);
// Get our button from the layout resource,
// and attach an event to it
//Button button = FindViewById<Button>(Resource.Id.MyButton);
//button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };
Log.Info(tag, "Error before variables");
userName = FindViewById<EditText>(Resource.Id.editTextUsername);
password = FindViewById<EditText>(Resource.Id.editTextPassword);
btnInsert = FindViewById<Button>(Resource.Id.btnInsert);
Log.Info(tag, "Error after variables");
btnInsert.Click += BtnInsert_Click;
}
changing emulators or exporting the signed .apk instead
For android apps, using android device logging
There is actually a connection between running Visual Studio as administrator and setting the registry path.
I followed the instructions here but it only worked after running VS as admin because my Android SDK path is in "C:\Program Files (x86)". So in order to add or change files there you need admin rights. Alternatively you can change the permissions of the "Android" folder so that the group "Users" as full access. This worked for me as well.
Or you make sure you don't even install the Android SDK in "C:\Program Files (x86)".
By the way I found that restarting VS, or even the Emulator again wasn't necessary after I added the registry key. It picks it up when it needs to.
I'm just getting started with Android development and was setting up Android Studio on my mac. (Following the instructions here)
When trying to run a simple hello world application and trying to learn my way around the IDE, I noticed the "Android Device monitor" disabled. Any ideas how I can fix this? This should be important when debugging apps hence the question.
I'm not sure what other info might be important for this question. I did make a few changes in the SDK manager, but they were just installing more components on top of what was already installed.
Once you open a valid project, the buttons become enabled.
Note that, even if the option is disabled, you can still bring up the Device Monitor by running the monitor.bat file in the tools directory of the Android SDK. (On Windows you can just double click the file or run it from a cmd shell.)
This problem occurs to me today. And I just click the button on the pic.
Problem solved.
and If this didn't work ,you can check this list in your Android Studio
1.Tools->Android->Enable ADB Integration
2.If you open DDMS, CLOSE it .
If these didn't work too, check the official file.
https://developer.android.com/studio/profile/am-basics.html