Status Update
Comments
[Deleted User] <[Deleted User]> #2
2022-01-19 11:01:47,579 [ 43614] INFO - manager.EmulatorProcessHandler - Emulator: /home/ghost/Android/Sdk/emulator/emulator -netdelay none -netspeed full -avd Pixel_API_31
2022-01-19 11:01:47,600 [ 43635] INFO - manager.EmulatorProcessHandler - Emulator: WARNING | unexpected system image feature string, emulator might not function correctly, please try updating the emulator.
2022-01-19 11:01:47,698 [ 43733] INFO - manager.EmulatorProcessHandler - Emulator: WARNING | cannot add library /home/ghost/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed
2022-01-19 11:01:47,760 [ 43795] INFO - manager.EmulatorProcessHandler - Emulator: qemu-system-x86_64: -chardev socket,port=45697,host=::1,nowait,nodelay,ipv6,id=modem: address resolution failed for ::1:45697: Name or service not known
2022-01-19 11:02:27,813 [ 83848] INFO - rationStore.ComponentStoreImpl - Saving Project(name=armino_rents, containerState=COMPONENT_CREATED, componentStore=/home/ghost/StudioProjects/armino_rents)KotlinCommonCompilerArguments
da...@gmail.com <da...@gmail.com> #3
/path/to/emulator -verbose -show-kernel -avd <avename> -feature -ModemSimulator
the above command line will not use modem, just to see if it is related.
[Deleted User] <[Deleted User]> #4
Attaching the log below.
[Deleted User] <[Deleted User]> #5
"qemu-system-x86_64: -chardev socket,port=38379,host=::1,nowait,nodelay,ipv6,id=modem: address resolution failed for ::1:38379: Name or service not known"
Adding the "-feature -ModemSimulator" flags worked around the issue for me.
da...@gmail.com <da...@gmail.com> #6
Hi truefalsetrue101@, could you try look at your /etc/hosts file on your machine? On my machine, it looks like
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
If ::1 localhost
is missing, that probably explains why "Name or service was not known".
vi...@google.com <vi...@google.com>
vi...@google.com <vi...@google.com> #7
I have that entry. Here's my entire /etc/hosts (my IP and hostname have been replaced with "xxx"):
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#
127.0.0.1 localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
192.168.xxx.xxx xxx
[Deleted User] <[Deleted User]> #8
RE#7
bohu@, any idea why this call would fail on host? I am also guessing maybe it has to do with the /etc/resolv.conf
on host.
if ((rc = getaddrinfo(addr, port, &ai, &local)) != 0) {
error_setg(errp, "address resolution failed for %s:%s: %s", addr, port,
gai_strerror(rc));
goto err;
}
da...@gmail.com <da...@gmail.com> #9
could be related to the linux flavor regarding address resolution.
my machine has almost the same config, and the getaddrinfo just works.
I wonder if there is some sys log you can put up here regarding that error.
vi...@google.com <vi...@google.com> #10
cc...@google.com <cc...@google.com> #11
OpenSUSE Tumbleweed has a toggle in it's network settings for "Enable IPv6". I don't have IPv6 on my internet connection and none of my local devices need it, so I usually leave it disabled.
I tried enabling it and viola, the emulator is starting for me again (without needing the ModemSimulator flag).
It looks like that toggle adds net.ipv6.conf.all.disable_ipv6 = 1
to /etc/sysctl.conf.
ve...@google.com <ve...@google.com> #12
that is very helpful information.
I was surprised that emulator does not even try ipv4 when ipv6 failed;
error_setg should be just a warning instead of quitting.
ve...@google.com <ve...@google.com> #13
Yes,turning IPv6 on worked for me too.
Description
Theme used: Theme.AppCompat.Light.DarkActionBar or Theme.MaterialComponents
Devices/Android versions reproduced on: irrelevant. (Tested on Nokia 8 Android 8.1, Nokia 7 Plus Android P beta 04)
I'm testing the method AppCompatTextView.setTextFuture but I realized, it didn't support layout direction (android:layoutDirection="rtl") from righ to left (RTL) or on a device has the system language shows from RTL as the Arabic language, even I removed the attr android:layoutDirection="rtl". The app will crash. Please test again.
java.lang.IllegalArgumentException: Given text can not be applied to TextView.
at androidx.core.widget.TextViewCompat.setPrecomputedText(TextViewCompat.java:889)
at androidx.appcompat.widget.AppCompatTextView.consumeTextFutureAndSetBlocking(AppCompatTextView.java:468)
at androidx.appcompat.widget.AppCompatTextView.onMeasure(AppCompatTextView.java:500)
at android.view.View.measure(View.java:22112)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6613)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1514)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:806)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:685)
at android.view.View.measure(View.java:22112)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6613)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:143)
at android.view.View.measure(View.java:22112)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6613)
at androidx.appcompat.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:401)
at android.view.View.measure(View.java:22112)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6613)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:22112)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6613)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1514)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:806)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:685)
at android.view.View.measure(View.java:22112)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6613)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:875)
at android.view.View.measure(View.java:22112)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2426)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1508)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1765)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1396)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6773)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:978)
at android.view.Choreographer.doCallbacks(Choreographer.java:790)
at android.view.Choreographer.doFrame(Choreographer.java:725)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:964)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6501)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
-------------------------------------------------
Source code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="
xmlns:tools="
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:orientation="vertical"
android:layoutDirection="rtl"
tools:context=".MainActivity">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</LinearLayout>
------------------------------------------------------------------------
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val textView = findViewById<AppCompatTextView>(R.id.textView);
setAsyncText(textView, "Testing the setTextFuture method ")
}
private fun setAsyncText(textView: AppCompatTextView, text: String?) {
if (!text.isNullOrEmpty()) {
val textFuture = PrecomputedTextCompat.getTextFuture(text!!, TextViewCompat.getTextMetricsParams(textView), null)
textView.setTextFuture(textFuture) // Crash
//textView.text = text // No crash
//textView.setPrecomputedText(PrecomputedTextCompat.create(text, textView.textMetricsParamsCompat)) // No crash
}
}
}
--------------------------------------------------------------
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
--------------------------------------
My device
Android Studio 3.3 Canary 6
Build #AI-182.3684.101.33.4954005, built on August 15, 2018
JRE: 1.8.0_152-release-1136-b06 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha06'
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-alpha10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.61"
}