Android Auto DHU failed to connect to android emulator - android-studio

I tried to connected Android Auto DHU r1.1 in windows with the Android Emulator in Android Studio,but got this error.
In emulator:
Communication error 8.
In desktop head unit:
Shutting down connection due to authentication failure.
I have checked the time, time zone and got the newest android auto.

adb forward tcp:5277 tcp:5277 (set adb proper port)
Stop head unit -> Start head unit (on the phone)
Launch desktop-head-unit.exe
and read https://developer.android.com/training/cars/testing#running-dhu
Work fine for me

Related

Android Studio Emulator AMD Ryzen 5 not working

I try to run an emulator after making so many configuration to work with an AMD cpu, I have a windows 10, already disabled Hyper-V and disabled Windows Hypervisor Platform, enabled Virtualization on bios, installed SDK tools on in SDK Manager, and even change graphics emulator to Hardware-GLES 2.0.
Finally, I can effectively had an emulator launches, but my flutter app is not installed.
I wanted to have a stacktrace so I run my emulator with command line and first of all, I have something like this :
Failed to open /qemu.conf, err: 2
GVM is operational
host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
emulator: INFO: boot completed
emulator: Increasing screen off timeout, logcat buffer size to 2M.
emulator: Revoking microphone permissions for Google App.
After searches, I added an empty qemu.conf file at C:/
Then :
C:\Users\lucil\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe:/qemu.conf:1: no group defined
In event log I have this stuff :
Could someone help me please ? I need to run on emulator because I need to make a presentation (it works well on my android device also)

android studio 3.1 cannot find device only in the dialog

Today I got a problem .There is neither usb device nor virtual device in the dialog.
But I can find device with commond.
Maybe there is something wrong with Android Studio.
How can I fix the problem?
After a day,I found the problem. The error is
WARN - #com.android.ddmlib - Unable to open connection to: localhost/30.129.144.64:5037, due to: java.net.ConnectException: Operation timed out
So I add localhot 127.0.0.1 to host file,and then restart AS.Everything is OK

Android studio 2.3 "Debug shows Connected and Disconnected lines but nothing in between"

I'm testing my app in a physical device
On debug run
Console
$ adb push C:\Users\arjun\AndroidStudioProjects\Scol\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.example.arjun.scol
$ adb shell pm install -r "/data/local/tmp/com.example.arjun.scol"
pkg: /data/local/tmp/com.example.arjun.scol
Success
$ adb shell am start -n "com.example.arjun.scol/com.example.arjun.scol.login.Login" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.example.arjun.scol | com.example.arjun.scol.test
Waiting for application to come online: com.example.arjun.scol | com.example.arjun.scol.test
Connecting to com.example.arjun.scol
Connected to the target VM, address: 'localhost:8600', transport: 'socket'
Disconnected from the target VM, address: 'localhost:8600', transport: 'socket'
My app crashes due to error, but nothing is displayed in the debug console... this happened after updating android studio to 2.3..
But when I scroll through Android Monitor,I found the error messages
03-05 12:50:40.380 6608-6608/com.example.arjun.scol E/AndroidRuntime: FATAL EXCEPTION: main
android.database.sqlite.SQLiteException: near ".": syntax error (code 1): , while compiling: CREATE TABLE IF NOT EXISTS teacer_homework(s.no. INTEGER AUTO INCREMENT, subject1 TEXT, subject2 TEXT, subject3 TEXT, subject4 TEXT, subject5 TEXT, subject6 TEXT, subject7 TEXT, date TEXT );
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1108)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:681)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:589)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1769)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1700)
at com.example.arjun.scol.database.MyDBHandler.classhomework(MyDBHandler.java:246)
at com.example.arjun.scol.SubjectSelection$2.onClick(SubjectSelection.java:59)
at android.view.View.performClick(View.java:4261)
at android.view.View$PerformClick.run(View.java:17420)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:177)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
0
I had edited the run configuration too...but that didn't help...
Should i downgrade android studio?
Go to Run -> Edit Configurations
Second tab "Miscellaneous"
Check item "Show logcat automatically"
it's better to check item "Clear log before launch", too.
and see logs and crashes in Android Monitor logcat
Look at menu bar and go to Run → Edit Configurations.
Select the second tab, "Miscellaneous".
Check "Show logcat automatically" and "Clear log before launch".
Try out File -> invalidate cache and restart
It worked out for me
go to File / Setting / Build, Execution, Deployment / Instant Run ,
enable Log extra ...
now you have the log in Android Monitor tab (alt+6)

Adb protocol fault (couldn't read status)

I am using Mac OSX El Captain with Android Studio 2.2.
Android Studio start to don't show Android devices suddenly. I try to kill adb server and start it again and this errors appear on terminal.
List of devices attached
daemon not running. starting it now on port 5037 *
adb E 1165 84563 usb_osx.cpp:307] Could not clear pipe stall both ends: e0004051
adb E 1165 84563 usb_osx.cpp:289] Could not find device interface
daemon started successfully *
When I try to kill server twice for understanding the issue it gives this error message:
error: protocol fault (couldn't read status): Connection reset by peer
Try restarting your Mac and devices. I ran into a similar error and restart got rid of it :)

Chrome remote desktop AND android emulator

I remote(chrome remote) to my desktop which runs android studio. When I try to run the emulator from android studio, i see the window with the virtual device open. But the device doesn't power on. This is not the behavior when I use the desktop directly to run the android project. Could this behavior be because of the remoting? If so how do i change it?
My need is to work on android studio on a remote connection, if there is a way to achieve it, kindly advise.
This is the AVD log
C:\Users\xxx\AppData\Local\Android\sdk\tools\emulator.exe -avd Nexus_5_API_21 -netspeed full -netdelay none
emulator: device fd:1228
HAX is working and emulator runs in fast virt mode
creating window 61 83 462 820
logcat
04-29 12:06:39.077 1966-1966/com.example.xxx.four4 E/libprocessgroup﹕ failed to make and chown /acct/uid_10053: Read-only file system
04-29 12:06:39.077 1966-1966/com.example.xxx.four4 W/Zygote﹕ createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?
04-29 12:06:39.078 1966-1966/com.example.xxx.four4 I/art﹕ Not late-enabling -Xcheck:jni (already on)
04-29 12:06:39.183 1966-1986/com.example.xxx.four4 D/OpenGLRenderer﹕ Render dirty regions requested: true
04-29 12:06:39.186 1966-1966/com.example.xxx.four4 D/﹕ HostConnection::get() New Host Connection established 0xa607f4c0, tid 1966
04-29 12:06:39.319 1966-1966/com.example.xxx.four4 D/Atlas﹕ Validating map...
04-29 12:06:40.050 1966-1966/com.example.xxx.four4 I/Choreographer﹕ Skipped 42 frames! The application may be doing too much work on its main thread.
04-29 12:06:40.184 1966-1986/com.example.xxx.four4 D/﹕ HostConnection::get() New Host Connection established 0xa607fa60, tid 1986
04-29 12:06:40.231 1966-1986/com.example.xxx.four4 I/OpenGLRenderer﹕ Initialized EGL, version 1.4
04-29 12:06:40.469 1966-1986/com.example.xxx.four4 D/OpenGLRenderer﹕ Enabling debug mode 0
04-29 12:06:40.521 1966-1986/com.example.xxx.four4 W/EGL_emulation﹕ eglSurfaceAttrib not implemented
04-29 12:06:40.521 1966-1986/com.example.xxx.four4 W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa6083580, error=EGL_SUCCESS
04-29 12:07:12.637 1966-1973/com.example.xxx.four4 W/art﹕ Suspending all threads took: 13.570ms
Thanks.
I have the same issue using a remote desktop. I solved it using another remote access application TeamViewer (http://teamviewer.com)
Using TeamViewer you can run any Android Emulator like x86, x86_64 or arm.
The Android emulator is not using all of your cpu capabilities but rather a single thread and my guess is that the remote desktop and the emulator are sharing the same thread thus preventing from your emulator to run while using the remote desktop. the solution is to use a stronger cpu or a different remote desktop as user2839592 said.

Resources