I am attempting to debug my application on my android device. running 4.1.2
The app builds and installs correctly but nothing displayed. I get an error message in the debugger that WinJS is undefined. so I check to make sure everything is referenced. and it appears all my scripts and files are not being added to the app package. This only happens when debugging on the android device the app runs fine on the ripple emulator and for windows phone device and windows store.
I have made sure the build tools revision 19 and all drivers are installed.
Please assist
Related
I have a question about running an app through the emulator on android studio.
My emulator device is able to turn on, but when running the app, install never completes so the app times out. I have tried invalidating cache and restarting, and I have installed the sdk platforms that are the same as the emulators and project, but these changes did not work. My computer cannot install emulator hypervisor driver for AMD processors or intel x86 Emulator accelerator, but I don't think it is necessary for the app to run since my emulator can turn on, right? also, any app has never successfully run on android studio.
The is no code other than the hello world that comes up automatically. This is an empty project with a minimum sdk of api: android 4.1. The device I am using is a pixel 2 with an api of 22. (size on disk 3.5 GB) for tools, I have android SDK build-tools 33, android emulator (31.3.10), and android sdk platform- tools (33.0.3) installed.
I have tried every forum that has the same issue as me but if you think there is one that can help me, please share it thanks.
Android Emulators aren't always the best so expect random failures. This is what I would try:
Make sure the app compiles properly (make sure you see BUILD SUCCESSFUL in your bottom "Build" Tab in Android Studio)
Make sure you have updated Android Studio and Android Emulator, Android Build Tools, SDKs etc.
Create and use a device with a higher API version. Ideally one with Play Store.
Depending on your development machine you might want to try a different architecture (ABI). Try x86 or x86_64 instead of what you've already tried.
In rare cases your existing emulator images get corrupted. Uninstall them in your SDK manager (Show Package Details) and install them again.
If possible try running the app on a real device (follow online instructions to enable USB debugging etc.) to verify the emulator is the problem.
I have just installed an Android Emulator - which is Pixel 4 API 28 - on my Windows 11 computer. I have a project in Expo and I want to test it on Android Emulator. For this, the Expo needs to install Expo Go on Emulator to load my project. By default, it installs automatically when I request for installation by pressing a on my terminal. It detects the connected and available devices on my computer and installs the application.
But for me this does not happen. Instead of installing automatically, the terminal prints me this:
› Opening on Android...
. Learn more: https://expo.fyi/authorize-android-device_4_API_28
This link leads to a 404 page of Github but if I remove the "_4_API_28" part from hyperlink it leads to "Authorize Android Device" page from fyi. This page guides how to reset USB debug permissions of my device to allow my computer to get debug access. I have already did that on my android emulator but nothing changed, it still prints that message.
Is there anything I can do to solve this issue and install Expo Go on my android emulator property?
I've just started a blank Cordova project on Visual Studio 2015, the intention being to use it to develop mobile apps in the future. I've been able to get it to run in the emulator on Android and even onto an iOS device (through a Mac), but I haven't been able to figure out how to run straight onto a WP8.1/Android device, or on a WP8 emulator. When I try, I get this message:
Error running one or more of the platforms: Error: cmd: Command failed with exit code 2
You may not have the required environment or OS to run this project
The Android device also says, above that:
ERROR: Failed to deploy to device, no devices found.
There's very little documentation online, and because it's all so new, Google hasn't been particularly enlightening. It's possible that I'm missing some software, but I don't know what.
For the devices, it could be that I'm supposed to select the device from a list somewhere, but I can't see anywhere that could be. For the emulator, I'm assuming I'm missing software, or a setting is wrong on my PC, but have no idea what it could be.
To fix the issue with WP8:
I had been playing around with different versions of VS... un-installing and re-installing 2013 and 2015 and eventually hit the same issue as you.
The solution here worked for me:
No Emulator lists to deploy windows phone app
I do not have an android phone to test with t the moment, so I have not seen the android device issue.
Using Intellj-idea I'm trying to debug into the Android source API 17 but when I set breakpoints in the platform source they are being ignored when run. Looking at the breakpoint whilst debugging there is a cross in it with a message stating "no executable code found at line 15,508 in class android.view"
I've tried running against an emulator with API 17 set as well as a phone with Android 4.2.2 but both don't work. I can sort of debug into the methods but the cursor jumps around.
So I'm guessing that there is no debug info as well as some optimisations that have gone on. So my question:
Is there a way I can properly debug the Android Platform from the perspective of my application and set breakpoints that work in it? Maybe a an emulator that has been been built with debug info?
Any help would be appreciated?
Regards
Lee
It depends on what application you are trying to debug: your own application, a system application such as android.process.acore.
To debug platform source running in your own application
The main issue is the line numbers of the platform source you have downloaded on your computer must match what is running on the device. Your best bet will be to debug on Google Nexus device such as the Nexus 5 or Nexus 7 since it should be running a compiled version of the source exactly as it was released by Google which you downloaded with the Android SDK. Just add the sourcepath to the sdk in IntelliJ, attach the debugger and set the breakpoint. Make sure you choose the same API level source as is running on the device. That should do it.
To debug platform source running in a system application
You will need eng build of the Android platform to debug system processes. If you haven't built and installed the Android platform before it is quite a bit of work and requires an unlocked bootloader. Maybe there are prebuilt eng builds of cyanogenmod or something that can be downloaded but I can't find any after some trivial Googling. You may also make an eng build of AOSP yourself and run the emulator on your machine. See Running emulator after building Android from source and the "Choose a target" section on the AOSP site for info on building your own eng build if you are feeling very ambitious.
I recently built a new PC, got the latest android SDK, Netbeans 7.1, java SDK, etc installed so I could debug my android apps. When my phone was connected to my old PC via USB I could simply run my app in Netbeans and it would automatically send it to my phone for debugging. All my phone settings are the same (install 3rd party apps: true, allow USB debugging: true) and I've upgraded all my app projects to the latest SDK version in Netbeans, so those aren't the issues. In addition, I've got the Motorola Droid X device drivers installed. I tried installing just the Motorola ADB interface driver but doing so it tells me a newer version is already available.
Can anyone help shed some light on what else I need to do to make Netbeans send the running app to my phone instead of starting the emulator? Thanks!
EDIT: The device does appear when I run "adb devices"
I'm not sure what fixed it, but I think one of the gotchas of netbeans/android is it doesn't give a great error message when it's time for you to uninstall the debug version of the app on your device. Once I did this it deployed just fine on my phone.