I am using Android Studio 2.2.2 and ran the app on emulator Nexus_5_5_API_23
The app runs very well on emulator, but I can't debug it on emulator:
Here is my console log:
$ adb shell am start -n
"mmstart0312.com.webrtc_android/mmstart0312.com.webrtc_android.MainActivity"
-a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D Waiting for application to come online:
mmstart0312.com.webrtc_android.test | mmstart0312.com.webrtc_android
Waiting for application to come online:
mmstart0312.com.webrtc_android.test | mmstart0312.com.webrtc_android
Waiting for application to come online:
mmstart0312.com.webrtc_android.test | mmstart0312.com.webrtc_android
What's wrong?
In Android-Studio : File -> Invalidate Caches / Restart
May The Code Be With You!
solved by attaching debugger to Android process once
Related
I am facing a problem debugging Delphi Linux application on WSL.
I have a machine running Ubuntu 20.04 and WSL Ubuntu 20.04 on my PC.
I create a basic console application.
Real Machine , Debug OK , Run OK , Cmd line OK
WSL , Debug fail , Run OK , Cmd line OK
When i try to debug on WSL delphi deploy application with success but debugger is not started ,There is no message !!
What am i missing ?
I have followed the exactly same installation procedure for paserver on both systems
Delphi 10.4.2.
Windows 10 Professional
Thanks for your help
After update to WSL2 everything works fine .
I had to edit the batch running the GUI with x410 ( /public )
and the code to get server address export DISPLAY=$(route.exe print | grep 0.0.0.0 | head -1 | awk '{print $4}'):0.0
Thank you very much #Brian
start /B x410.exe /desktop /public
Ubuntu2004.exe run "if [ -z \"$(pidof xfce4-session)\" ]; then export DISPLAY=$(route.exe print | grep 0.0.0.0 | head -1 | awk '{print $4}'):0.0; xfce4-session; pkill '(gpg|ssh)-agent'; fi;"
Using Android Studio 1.5.1 in a win7 ultimate sp1 and in a Mac mini 10.11.3 fully updated.
I have a number of Samsung units for testing my app development incl JNI and this week my private Samsung Galaxy S4mini (Kitkat) died physically so I got a new Samsung Galaxy J5.
However the J5 (lollipop) refuses to be debugged in native mode. Does not matter the app, fails also with Hello-JNI.
The J5 also have some odd java bugs like in a AlertDialog (with stacked linear layouts) linearLayout.addView(anotherLinearLayout); just crashes?? Also I have an odd JNI-bug, I like to debug. And both "bugs" works without crashing in my other devices my old S4mini and a TAB4 Kitkat and a TAB3 and S3mini.
However I found the TAB4 also refuses native debugging. Both the TAB4 and the J5 works fine in (non-native) app-debugging. All other units debugs native no problem, just switching unit on the cable and run, works fine?
Is there something missing in the J5 and TAB4 for making native debugging available?
The debug error message is (I tried everything I could find):
Target device: samsung-sm_j500fn-0af60463
Installing APK: C:\Users\JB\AndroidStudioProjects\HelloJNI\app\build\outputs\apk\app-all-debug.apk
Uploading file to: /data/local/tmp/com.example.hellojni
Installing com.example.hellojni
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.hellojni"
pkg: /data/local/tmp/com.example.hellojni
Success
Launching application: com.example.hellojni/com.example.hellojni.HelloJni.
DEVICE SHELL COMMAND: am start -D -n "com.example.hellojni/com.example.hellojni.HelloJni" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.hellojni/.HelloJni }
Warning: debug info can be unavailable. Please close other application using ADB: Monitor, DDMS, Eclipse
Restart ADB integration and try again
Waiting for process: com.example.hellojni
DEVICE SHELL COMMAND: run-as com.example.hellojni mkdir /data/data/com.example.hellojni/lldb
Error while launching debug server on device: com.android.tools.ndk.run.DebuggerContext$StartServerException: java.lang.IllegalStateException: run-as is broken (please see http://b.android.com/187955 for details)
Android studio launches emulator with such command line:
/Users/sergey/Library/Android/sdk/tools/emulator -avd Nexus_5_API_22_x86 -netspeed full -netdelay none
How do I add additional options? I need to specify -http-proxy command line parameter
First, run the emulator from the terminal:
/Users/sergey/Library/Android/sdk/tools/emulator -avd Nexus_5_API_22_x86 -"all parameters you need"
Then, clic on the run button in Android Studio. Select your device, that is already running. Your app will deploy there.
The command to run start Nexus_5X_Edited_API_23 emulator with proxy setting (get more params here)
~/Library/Android/sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5X_Edited_API_23 -http-proxy http://username:password#local_server:8080
also You can list all emulators name from command
emulator -list-avds
From Emulator help section make all TCP connections through a specified HTTP/HTTPS proxy
The value of can be one of the following:
http://<server>:<port>
http://<username>:
<password>#<server>:<port>
The http:// prefix can be omitted. If the -http-proxy <proxy> command is not supplied, the emulator looks up the http_proxy environment variable and automatically uses any value matching the <proxy> format described above.
I am a new linux user and when I installed eclipse and sdk for android in linux.I get below error
when I start emolator and wait for 15 minute. I ran my project.my project run very good and below message is shown.
[2013-05-30 09:53:13 - RamzNegar] Android Launch!
[2013-05-30 09:53:13 - RamzNegar] adb is running normally.
[2013-05-30 09:53:13 - RamzNegar] Performing com.elmos.ramznegar.MainActivity activity launch
[2013-05-30 09:53:13 - RamzNegar] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2013-05-30 09:53:22 - RamzNegar] Uploading RamzNegar.apk onto device 'emulator-5554'
[2013-05-30 09:53:23 - RamzNegar] Installing RamzNegar.apk...
[2013-05-30 09:53:39 - RamzNegar] Success!
[2013-05-30 09:53:39 - RamzNegar] Starting activity com.elmos.ramznegar.MainActivity on device emulator-5554
but i cannot show anything in emolator
I see below image
if answer is ~my emolator not run yet~;why my emolator dont run
how i can solve this problem?
for the first time that you run emulator it will run very slow
and when you run your app ,eclipse didnot get you error
I think this is a bug for google
I hope that speed of emulator will be improve
I am trying to deploy my android app from eclipse on to my blackberry Z10 running 10.0.9.422 and i am unsuccessfull at it.
Here is the actual error that i am receiving.
Failed to deploy project XXXX
Info: Sending request: Install
Info: Action: Install
Info: File size: 8659959
Info: Installing ...
Info: Processing 8659959 bytes
Info: Progress 0%...
Info: Progress 49%...
Info: Progress 50%...
Info: Progress 100%...
actual_dname::com.xxx.xxxx.testEPPwDTJahv0UbAeaecXksgI
actual_id::testEPPwDTJahv0UbAeaecXksgI
actual_version::1.0.3.0
result::failure -9
After this error, I could see the app icon on my Z10, but when i try to access it, it says' Initializing. Please wait...' and the app crashes thereafter.
What does failure -9 indicate and any idea on what's the issue/resolution might be?
Any help is greatly appreciated.
I was able to fix my problem after doing little research and finding the unsupported libraries for my app. I figured out the unsupported libraries using the apkbarVerifier tool.
My app was using com.google.android.maps package. So, I edited the android manifest file to reflect the below line.
<uses-library android:name="com.google.android.maps" android:required="false" />
After this change, even though the 'Verify apk' option from eclipse is showing me the same warnings, I was able to deploy the app to my Z10 and had it to work.
Basically, failure -9 on deployment means that the app contains an unsupported library.