在本文中,您将会了解到关于Android开发-软件版本升级与黑暗模式的适配【Android10】的新资讯,同时我们还将为您解释安卓黑暗模式app的相关在本文中,我们将带你探索Android开发-软件版
在本文中,您将会了解到关于Android开发-软件版本升级与黑暗模式的适配【Android 10】的新资讯,同时我们还将为您解释安卓黑暗模式app的相关在本文中,我们将带你探索Android开发-软件版本升级与黑暗模式的适配【Android 10】的奥秘,分析安卓黑暗模式app的特点,并给出一些关于Android 10 和Android 11的适配、android app内置webview,随android版本升级进程关系的变化、Android Path菜单的简单实现,android开发软件、android sdk需要android开发者工具包版本22.6.1或以上[复制]的实用技巧。
本文目录一览:- Android开发-软件版本升级与黑暗模式的适配【Android 10】(安卓黑暗模式app)
- Android 10 和Android 11的适配
- android app内置webview,随android版本升级进程关系的变化
- Android Path菜单的简单实现,android开发软件
- android sdk需要android开发者工具包版本22.6.1或以上[复制]
Android开发-软件版本升级与黑暗模式的适配【Android 10】(安卓黑暗模式app)
引言
随着时间的发展,Android版本正在不断更新。随着版本更新带来的系统变化,许多旧版本的应用在新版本上不可避免地出现了兼容性的问题,导致使用体验下降甚至无法使用,这时我们需要做的就是软件版本的升级和适配,这篇教程简单地介绍将一个应用升级到安卓10以及适配新特性的过程。
首先是Google官方的操作流程:
这里用我自己的期中项目Notepad举例:
github地址:https://github.com/ZeroNinx/AS_Dev/tree/master/NotePad
它的目标平台是Android 7(N),没有对黑夜模式的支持,背景色是白色,尽管可以跑,但是在安卓10的手机上运行起来是这样的:
可以看出,原先黑色的字体并不协调,当手机处于黑暗模式的情况下,设置了自定义背景色的菜单却还是白色,如果用户主题为黑色,将会影响观感,因此,我们需要将应用进行适配更新
准备工作
1、一部Android10的手机或模拟器
2、在Android Studio中安装Android10的SDK
适配黑暗模式
为了解决黑暗模式的问题,我们首先需要知道安卓10如何分辨是否为黑暗模式,这里Google官方为我们提供了API。
Google官方文档的介绍:
https://developer.android.google.cn/guide/topics/ui/look-and-feel/darktheme
实现
首先在style.mxl主题继承DayNight主题,我们的就有了适配黑夜主题的能力
既然有了夜间模式主题,那接下来就要针对夜间模式做出适配,表现在字体和背景等方面,这些都和value.xml中的值有关,为了适配黑夜模式,我们要将values文件夹复制一份另存为values-night,成功之后AS的values文件夹下会有普通和night两个选项,我们就可以对这两个文件夹里的xml进行编辑进行不同模式的适配看了。
在我们需要适配的xml中,需要分别在values和values-night设定不同的值,而且名字要一样,否则会报错,这里改变了之前看起来不自然的主菜单为例,现在不能将android:xxxColor直接硬编码为"#XXXXX"(颜色代码)了,需要正确改为"@color/xxxxx",因为硬编码是不会被适配的,例如:
lv_index_unit.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="@color/colorUnitBackground">
<!--替换背景为动态编码-->
<TextView
android:id="@+id/tv_tag"
android:layout_width="80dp"
android:layout_height="15dp"
android:layout_marginBottom="10dp"
android:gravity="center"
android:text="@string/tv_tag"
android:textSize="12sp"
android:textapp:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/tv_text"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="230dp"
android:layout_height="30dp"
android:layout_marginTop="10dp"
android:gravity="start"
android:orientation="horizontal"
android:text="@string/tv_title"
android:textColor="@color/colorUnitTitle"
android:textSize="22sp"
android:textapp:layout_constraintStart_toStartOf="@+id/tv_text"
app:layout_constraintTop_toTopOf="parent" />
<!--替换标题颜色为动态编码-->
<TextView
android:id="@+id/tv_text"
android:layout_width="190dp"
android:layout_height="40dp"
android:layout_marginStart="10dp"
android:layout_marginTop="5dp"
android:gravity="start"
android:text="@string/tv_text"
android:textColor="@color/colorUnitText"
android:textSize="12sp"
app:layout_constraintStart_toEndOf="@+id/iv_icon"
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
<!--替换文字颜色为动态编码-->
<TextView
android:id="@+id/tv_time"
android:layout_width="100dp"
android:layout_height="15dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="20dp"
android:gravity="end|center_vertical"
android:text="@string/tv_time"
android:textSize="12sp"
android:textapp:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<ImageView
android:id="@+id/iv_remove"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginEnd="30dp"
android:layout_marginBottom="10dp"
android:contentDescription="@string/iv_remove"
app:layout_constraintBottom_toTopOf="@+id/tv_time"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/icon_delete" />
<ImageView
android:id="@+id/iv_icon"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginStart="15dp"
android:layout_marginTop="10dp"
android:contentDescription="@string/iv_remove"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/icon_notepad" />
<TextView
android:id="@+id/tv_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#00FF0000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
activity_notepad.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ActivityNotepad">
<ScrollView
android:id="@+id/sv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorNotepadBackground"
android:orientation="vertical">
<!--替换背景为动态编码-->
<EditText
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_margin="10dp"
android:autofillHints=""
android:ems="10"
android:fontFamily="sans-serif-black"
android:gravity="start"
android:hint="@string/et_title_hint"
android:inputType="textPersonName"
android:textColor="@color/colorNotepadTitle"
android:textSize="30sp" />
<!--替换标题颜色为动态编码-->
<com.example.notepad.MultilineTextEditWithUnderLine
android:id="@+id/et_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@null"
android:gravity="start"
android:hint="@string/et_text_hint"
android:letterSpacing="0.03"
android:linespacingMultiplier="1.5"
android:maxLines="30"
android:minLines="20"
android:textColor="@color/colorNotepadText"
android:textSize="18sp" />
<!--替换文字颜色为动态编码-->
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
更改values/color.xml(白天模式)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#6200EE</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorAccent">#03DAC5</color>
<color name="colorUnitBackground">#CCCCFF</color>
<color name="colorUnitTitle">#000000</color>
<color name="colorUnitText">#111111</color>
<color name="colorNotepadBackground">#FFFFFF</color>
<color name="colorNotepadTitle">#000000</color>
<color name="colorNotepadText">#111111</color>
</resources>
更改values-night/color.xml(黑夜模式)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#6200EE</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorAccent">#03DAC5</color>
<color name="colorUnitBackground">#555555</color>
<color name="colorUnitTitle">#FFFFFF</color>
<color name="colorUnitText">#EEEEEE</color>
<color name="colorNotepadBackground">#777777</color>
<color name="colorNotepadTitle">#FFFFFF</color>
<color name="colorNotepadText">#EEEEEE</color>
</resources>
可以看出,AS默认的白天模式和在黑夜模式的手机上表现出了不一样的效果,这是系统自己适配的,图标的适配也一样,使用动态编码替换黑白两种图标,就能更加适配主题。
最后,在Java代码里来获取夜间模式的开启状态,便于我们动态做出更多选择。
//配置当前模式
protected void configTheme()
{
//选择当前的主题模式
int currentNightMode = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
switch (currentNightMode) {
case Configuration.UI_MODE_NIGHT_NO:
// 夜间模式未开启
break;
case Configuration.UI_MODE_NIGHT_YES:
// 夜间模式已开启
break;
}
}
至此,简单的迁移和适配已经结束,更多API可以参阅Google官方文档。
原文链接:https://blog.csdn.net/zwq939681378/article/details/111469662
作者:朱蔚钦
Android 10 和Android 11的适配
背景
最近在项目中着手做Android10
和Android11
适配时候,期间遇到了不少的坑。之前有专门写过qq、微信分享的适配。但是此次在针对偏业务侧适配工作的时候还是碰到了一些新的问题。记录下来,方便以后查阅,希望能帮到碰到此问题的相关同学。
一、 私有目录下资源访问
存在这样一个场景:我们要分享一张图片到qq或者微信,首先第一步是要是得到这个bitmap(通过本地生成或者网络加载),然后存储到本地sd卡上,最后把存储的图片的绝对路径传给qq或者微信即可。
在以上的场景中,涉及到了这些关键点:
- 把图片存储到sd卡
- 把绝对路径path传递给qq或者微信
1.1 直接访问sd卡的根目录
通过FileOutPutStream来完成,在Android10以下都没问题。路径如下:
/storage/emulated/0/demo/sharePicture/1637048769163_share.jpg
但是在Android10及以上
,就会存在会报错:
java.io.FileNotFoundException: /storage/emulated/0/demo/sharePicture/1637048769163_share.jpg: open failed: EACCES (Permission denied)
//其实存储权限是同意了的
这是因为,我们被存储分区限制了,不能直接访问外部目录。因此,我们需要修改存储路径为scope的App-specific目录。
1.2 改为App-specific私有目录
该目录自己访问不需要权限,如果第三方访问需要权限! 因此,我们后面通过FileProvider
去临时授权即可。 如果对 FileProvider
不熟悉,可参考篇头的文章。
/storage/emulated/0/Android/data/com.demo.test/files
当你再通过FileOutPutStream
来存储图片时候,是成功的。
private fun saveImage(bitmap: Bitmap, storePath: String, filePath: String): Boolean {
val appDir = File(storePath)
if (!appDir.exists()) {
appDir.mkdirs()
}
val file = File(filePath)
if (file.exists()) {
file.delete()
}
var fos: FileOutputStream? = null
try {
fos = FileOutputStream(file)
bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos)
fos.flush()
return true
} catch (e: IOException) {
e.printStackTrace()
} catch (e: FileNotFoundException) {
e.printStackTrace()
} finally {
fos?.close()
}
return false
}
经过测试,在29的下和29 的设备下,分享qq、微信都成功了。
1.3 分享原理总结
分享的本质就是把图片路径
给qq或微信
访问,让他们能够访问到我们的图片。分区之前是存储在外部sd卡,都没有问题。
分区后,qq或微信
没法访问的我们的私有目录App-specific
。因此,我们需要通过 fileprovider
转换成 content:// 格式
去分享,临时授权给 qq或微信
来访问我们的图片。
qq是内部自己做了 fileprovider
适配,因此,我们只需要传入绝对路径 file://
格式即可,而微信是需要接收 content://
格式,所以需要我们外部自己来转换。
具体的适配逻辑参考篇头的文章~
二、公共目录下资源访问
Google建议我们采用 mediaStore
或者 SAF
去访问。在Android10
上公共目录下的图片无法通过file:// 格式
去访问,提示找不到路径。如glide加载、图片选择库、裁剪框架等等都会收到影响。
但是,这里有个坑: 在Android10上不行,在Android11上又可以!!为什么?
因为Google改回来了,让Android11支持file://
格式了。。。。 (wtf? 我谢谢你啊~~)
**我这里说的 Android10
和 android 11
是指 targetSdkVersion
哦 **
2.1 往公共目录插入一张图片
只能通过mediaStore方式:
ContentValues values = new ContentValues();
values.put(MediaStore.Images.Media.DESCRIPTION, "This is an image");
values.put(MediaStore.Images.Media.DISPLAY_NAME, "Image.png");
values.put(MediaStore.Images.Media.MIME_TYPE, "image/png");
values.put(MediaStore.Images.Media.TITLE, "Image.png");
values.put(MediaStore.Images.Media.RELATIVE_PATH, "Pictures/test");
Uri external = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
ContentResolver resolver = context.getContentResolver();
//这里就能拿到这个insertUri
Uri insertUri = resolver.insert(external, values);
LogUtil.log("insertUri: " + insertUri);
OutputStream os = null;
try {
if (insertUri != null) {
os = resolver.openOutputStream(insertUri);
}
if (os != null) {
final Bitmap bitmap = Bitmap.createBitmap(32, 32, Bitmap.Config.ARGB_8888);
bitmap.compress(Bitmap.CompressFormat.PNG, 90, os);
// write what you want
}
} catch (IOException e) {
LogUtil.log("fail: " + e.getCause());
} finally {
try {
if (os != null) {
os.close();
}
} catch (IOException e) {
LogUtil.log("fail in close: " + e.getCause());
}
}
2.2 content uri转file格式路径
public static String getFilePathFromContentUri(Uri selectedVideoUri,
ContentResolver contentResolver) {
String filePath;
String[] filePathColumn = {MediaStore.MediaColumns.DATA};
Cursor cursor = contentResolver.query(selectedVideoUri, filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
filePath = cursor.getString(columnIndex);
cursor.close();
return filePath;
}
2.3 根据图片名来获取file格式路径
String imageName="test";
Uri external = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
ContentResolver resolver = BaseApp.getContext().getContentResolver();
String selection = MediaStore.Images.Media.TITLE + "=?";
String[] args = new String[] {imageName};
String[] projection = new String[] {MediaStore.Images.Media._ID};
Cursor cursor = resolver.query(external, projection, selection, args, null);
// 这里的得到content 格式的uri
Uri imageUri = null;
//content://media/external/images/media/318952
if (cursor != null && cursor.moveToFirst()) {
imageUri = ContentUris.withAppendedId(external, cursor.getLong(0));
cursor.close();
}
拿到绝对路径后,在Android11上都 glide、qq分享、第三方的图片选择框架等都可以正常访问。
三、终极适配方案
- 在Android10上
开启标志位 :android:requestLegacyExternalStorage="true"
来开启兼容模式,关闭分区适配,相当于targetSdkVersion=29
的时候还是以旧的方式运行,完全没问题。完美避开无法访问公共目录的坑!!!
- 在Android11上
以上标志会自动失效。因此,应用存储的东西还在放在App-specific目录下。分享私有目录可以通过fileprovider
方式适配。 要分享公共目录,因为支持File api
直接访问公共目录,因此,可以直接把content格式
转成file格式
即可,具体可回看文中的第二部分。
最后,我还想问两个问题:
1. targetSdk=30,android:requestLegacyExternalStorage="false"运行在Android10的设备上 会咋么样?
答: 肯定会碰到权限问题。因为,Android10
的设备还是以Android10
的兼容模式运行的。所以要改成true
。
2. targetSdk=30,android:requestLegacyExternalStorage="false"运行在Android11的设备上 会咋么样?
答: 如果按照上面正常适配,肯定完全没得问题!
以上是自己适配经验,难免有疏忽之处,如果文章有问题或者更好的建议,欢迎评论指正~
相关教程
Android基础系列教程:
Android基础课程U-小结_哔哩哔哩_bilibili
Android基础课程UI-布局_哔哩哔哩_bilibili
Android基础课程UI-控件_哔哩哔哩_bilibili
Android基础课程UI-动画_哔哩哔哩_bilibili
Android基础课程-activity的使用_哔哩哔哩_bilibili
Android基础课程-Fragment使用方法_哔哩哔哩_bilibili
Android基础课程-热修复/热更新技术原理_哔哩哔哩_bilibili
本文转自 https://juejin.cn/post/7032525748686553095,如有侵权,请联系删除。
android app内置webview,随android版本升级进程关系的变化
Q
最近遇到一个问题:多个应用打不开,闪退。
A
调查发现闪退的应用都在首屏加载了webview,而在android p上webview的渲染是在另外一个进程上进行的,进程名字类似webview:sandboxed_process0,这个进程是由webview_zygote这样一个进程fork出来的,而webview_zygote由于缺少权限runtime崩溃,从而导致webview加载失败,应用闪退。
S
增加相应权限
webview_zygote.te
allow webview_zygote ion_device:chr_file r_file_perms;
简单调查了下加载webview的应用,随android版本升级进程关系的变化
1.在android o以前
webview运行在app进程里
2.android o
webview运行在单独的进程里com.android.webview:sandboxed_process(n)
webview进程是由webview_zygote进程fork出来的
而webview_zygote进程是由1号进程init进程forkc出来的
能看出不管应用进程运行时是32bit还是64bit,wevview进程的运行时应该是32bit,因为webview_zygote是32bit的,它只能fork 32bit进程出来,生不出别的孩子
可以看到32bit,64bit运行时应用的祖宗zygote和zygote64也是init进程fork出来的
USER PID PPID VSZ RSS WCHAN ADDR S NAME
root 1 0 60588 1576 0 0 S init
root 983 1 4287904 19896 0 0 S zygote64
root 984 1 1618076 18836 0 0 S zygote
webview_zygote 1943 1 1396420 11180 0 0 S webview_zygote32
u0_i188 3756 1943 1474636 20108 0 0 S com.android.webview:sandboxe
u0_i185 29184 1943 1474636 18096 0 0 S com.android.webview:sandboxe
3.android p总体上和android o一样,但是有些区别
webview运行在单独的进程里com.android.webview:sandboxed_process(n)
webview进程是由webview_zygote进程fork出来的
这里稍有不同webview_zygote进程是由zygote fork出来的,当然它也只能是32bit的运行时,它儿子孙子都是
USER PID PPID VSZ RSS WCHAN ADDR S NAME
root 1 0 60588 1576 0 0 S init
root 572 1 4316640 133916 poll_schedule_timeout 0 S zygote64
root 573 1 1628984 120228 poll_schedule_timeout 0 S zygote
webview_zygote 2003 573 1631044 58384 poll_schedule_timeout 0 S webview_zygote
u0_i1 6247 2003 1181360 18528 ep_poll 0 S com.android.webview:sandboxed_process0
4.不但如此android o和android p编译链接关系上有不同
zygote,webview_zygote编译链接关系发生了变化,链接了不同的库
问题错误栈
I WebViewFactory: Loading com.android.webview version 66.0.3359.158 (code 336015855)
W cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.android.webview, sandboxed = true
W libprocessgroup: kill(-4305, 9) failed: No such process
I libprocessgroup: Successfully killed process cgroup uid 10064 pid 4305 in 95ms
I cr_BrowserStartup: Initializing chromium process, singleProcess=false
I cr_base : Android Locale: en_US requires .pak files: []
E webview_zygote: Unable to restat fd 28: Permission denied
F webview_zygote: jni_internal.cc:616] JNI FatalError called: (com.android.webview:sandboxed_process0) Unable to stat 28
W webview_zygote: type=1400 audit(0.0:27): avc: denied { getattr } for path="/dev/ion" dev="tmpfs" ino=12718 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=0
W webview_zygote: type=1400 audit(0.0:28): avc: denied { getattr } for path="/dev/ion" dev="tmpfs" ino=12718 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=0
W webview_zygote: type=1400 audit(0.0:29): avc: denied { read } for name="app_process32" dev="mmcblk0p25" ino=467 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:zygote_exec:s0 tclass=file permissive=0
F webview_zygote: runtime.cc:558] Runtime aborting...
F webview_zygote: runtime.cc:558] Dumping all threads without appropriate locks held: thread list lock mutator lock
F webview_zygote: runtime.cc:558] All threads:
F webview_zygote: runtime.cc:558] DALVIK THREADS (1):
F webview_zygote: runtime.cc:558] "main" prio=5 tid=1 Runnable
F webview_zygote: runtime.cc:558] | group="" sCount=0 dsCount=0 flags=0 obj=0x74d7cf48 self=0xf2f73000
F webview_zygote: runtime.cc:558] | sysTid=2332 nice=0 cgrp=default sched=0/0 handle=0xf6b54494
F webview_zygote: runtime.cc:558] | state=R schedstat=( 80557599 15727867 94 ) utm=5 stm=3 core=5 HZ=100
F webview_zygote: runtime.cc:558] | stack=0xff72b000-0xff72d000 stackSize=8MB
F webview_zygote: runtime.cc:558] | held mutexes= "abort lock" "mutator lock"(shared held)
F webview_zygote: runtime.cc:558] native: #00 pc 002d975f /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap, char const, art::ArtMethod, void, bool)+134)
F webview_zygote: runtime.cc:558] native: #01 pc 0036e98b /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+210)
F webview_zygote: runtime.cc:558] native: #02 pc 0036b143 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+34)
F webview_zygote: runtime.cc:558] native: #03 pc 00383df9 /system/lib/libart.so (art::DumpCheckpoint::Run(art::Thread*)+624)
F webview_zygote: runtime.cc:558] native: #04 pc 0037e0df /system/lib/libart.so (art::ThreadList::RunCheckpoint(art::Closure, art::Closure)+314)
F webview_zygote: runtime.cc:558] native: #05 pc 0037d7d7 /system/lib/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool)+758)
F webview_zygote: runtime.cc:558] native: #06 pc 0034d8fb /system/lib/libart.so (art::Runtime::Abort(char const*)+314)
F webview_zygote: runtime.cc:558] native: #07 pc 000071b3 /system/lib/libbase.so (android::base::LogMessage::~LogMessage()+494)
F webview_zygote: runtime.cc:558] native: #08 pc 00265a0f /system/lib/libart.so (art::JNI::FatalError(_JNIEnv, char const)+122)
F webview_zygote: runtime.cc:558] native: #09 pc 0010b4d5 /system/lib/libandroid_runtime.so (_ZZN12_GLOBAL__N_123ForkAndSpecializeCommonEP7_JNIEnvjjP10_jintArrayiP13_jobjectArrayxxiP8_jstringS7_bS3_S3_bS7_S7_ENK3$_0clERKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEE+92)
F webview_zygote: runtime.cc:558] native: #10 pc 0010b28f /system/lib/libandroid_runtime.so ((anonymous namespace)::ForkAndSpecializeCommon(_JNIEnv, unsigned int, unsigned int, _jintArray, int, _jobjectArray, long long, long long, int, _jstring, _jstring, bool, _jintArray, _jintArray, bool, _jstring, _jstring*)+4958)
F webview_zygote: runtime.cc:558] native: #11 pc 001097f1 /system/lib/libandroid_runtime.so (android::com_android_internal_os_Zygote_nativeForkAndSpecialize(_JNIEnv, _jclass, int, int, _jintArray, int, _jobjectArray, int, _jstring, _jstring, _jintArray, _jintArray, unsigned char, _jstring, _jstring)+476)
F webview_zygote: runtime.cc:558] at com.android.internal.os.Zygote.nativeForkAndSpecialize(Native method)
W VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
F webview_zygote: runtime.cc:558] at com.android.internal.os.Zygote.forkAndSpecialize(Zygote.java:139)
F webview_zygote: runtime.cc:558] at com.android.internal.os.ZygoteConnection.processOneCommand(ZygoteConnection.java:234)
E chromium: [ERROR:devtools_http_handler.cc(292)] Cannot start http server for devtools. Stop devtools.
F webview_zygote: runtime.cc:558] at com.android.internal.os.ZygoteServer.runSelectLoop(ZygoteServer.java:204)
F webview_zygote: runtime.cc:558] at com.android.internal.os.WebViewZygoteInit.main(WebViewZygoteInit.java:160)
F webview_zygote: runtime.cc:558] at java.lang.reflect.Method.invoke(Native method)
F webview_zygote: runtime.cc:558] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
D AutofillManagerServiceImpl: Reset component for user 0 ()
F webview_zygote: runtime.cc:558] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
F webview_zygote: runtime.cc:558]
F webview_zygote: runtime.cc:558] Aborting thread:
F webview_zygote: runtime.cc:558] "main" prio=5 tid=1 Native
F webview_zygote: runtime.cc:558] | group="" sCount=0 dsCount=0 flags=0 obj=0x74d7cf48 self=0xf2f73000
F webview_zygote: runtime.cc:558] | sysTid=2332 nice=0 cgrp=default sched=0/0 handle=0xf6b54494
F webview_zygote: runtime.cc:558] | state=R schedstat=( 102025203 15767659 98 ) utm=7 stm=3 core=6 HZ=100
F webview_zygote: runtime.cc:558] | stack=0xff72b000-0xff72d000 stackSize=8MB
F webview_zygote: runtime.cc:558] | held mutexes= "abort lock"
F webview_zygote: runtime.cc:558] native: #00 pc 002d975f /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap, char const, art::ArtMethod, void, bool)+134)
F webview_zygote: runtime.cc:558] native: #01 pc 0036e98b /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool,BacktraceMap*, bool) const+210)
F webview_zygote: runtime.cc:558] native: #02 pc 0036b143 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+34)
F webview_zygote: runtime.cc:558] native: #03 pc 003598b3 /system/lib/libart.so (art::AbortState::DumpThread(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, art::Thread*) const+30)
F webview_zygote: runtime.cc:558] native: #04 pc 0034d953 /system/lib/libart.so (art::Runtime::Abort(char const*)+402)
F webview_zygote: runtime.cc:558] native: #05 pc 000071b3 /system/lib/libbase.so (android::base::LogMessage::~LogMessage()+494)
F webview_zygote: runtime.cc:558] native: #06 pc 00265a0f /system/lib/libart.so (art::JNI::FatalError(_JNIEnv, char const)+122)
F webview_zygote: runtime.cc:558] native: #07 pc 0010b4d5 /system/lib/libandroid_runtime.so (_ZZN12_GLOBAL__N_123ForkAndSpecializeCommonEP7_JNIEnvjjP10_jintArrayiP13_jobjectArrayxxiP8_jstringS7_bS3_S3_bS7_S7_ENK3$_0clERKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEE+92)
F webview_zygote: runtime.cc:558] native: #08 pc 0010b28f /system/lib/libandroid_runtime.so ((anonymous namespace)::ForkAndSpecializeCommon(_JNIEnv, unsigned int, unsigned int, _jintArray, int, _jobjectArray, long long, long long, int, _jstring, _jstring, bool, _jintArray, _jintArray, bool, _jstring, _jstring*)+4958)
F webview_zygote: runtime.cc:558] native: #09 pc 001097f1 /system/lib/libandroid_runtime.so (android::com_android_internal_os_Zygote_nativeForkAndSpecialize(_JNIEnv, _jclass, int, int, _jintArray, int, _jobjectArray, int, _jstring, _jstring, _jintArray, _jintArray, unsigned char, _jstring, _jstring)+476)
F webview_zygote: runtime.cc:558] native: #10 pc 003cb633 /system/framework/arm/boot-framework.oat (offset 3ab000) (com.android.internal.os.Zygote.nativeForkAndSpecialize+338)
F webview_zygote: runtime.cc:558] native: #11 pc 00a0ba7f /system/framework/arm/boot-framework.oat (offset 3ab000) (com.android.internal.os.Zygote.forkAndSpecialize+198)
F webview_zygote: runtime.cc:558] native: #12 pc 00a0eb0d /system/framework/arm/boot-framework.oat (offset 3ab000) (com.android.internal.os.ZygoteConnection.processOneCommand+1388)
F webview_zygote: runtime.cc:558] native: #13 pc 00a13675 /system/framework/arm/boot-framework.oat (offset 3ab000) (com.android.internal.os.ZygoteServer.runSelectLoop+780)
F webview_zygote: runtime.cc:558] native: #14 pc 0040d575 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
F webview_zygote: runtime.cc:558] native: #15 pc 003e6b79 /system/lib/libart.so (art_quick_invoke_stub+224)
F webview_zygote: runtime.cc:558] native: #16 pc 000a1015 /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const)+136)
F webview_zygote: runtime.cc:558] native: #17 pc 001e5ae9 /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread, art::ArtMethod, art::ShadowFrame, unsigned short, art::JValue)+236)
F webview_zygote: runtime.cc:558] native: #18 pc 001e05d7 /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod, art::Thread, art::ShadowFrame&, art::Instruction const, unsigned short, art::JValue)+814)
F webview_zygote: runtime.cc:558] native: #19 pc 003e3c1d /system/lib/libart.so (MterpInvokeVirtualQuick+428)
F webview_zygote: runtime.cc:558] native: #20 pc 00404094 /system/lib/libart.so (ExecuteMterpImpl+29972)
F webview_zygote: runtime.cc:558] native: #21 pc 00dc4ff8 /system/framework/boot-framework.vdex (com.android.internal.os.WebViewZygoteInit.main+198)
F webview_zygote: runtime.cc:558] native: #22 pc 001c4d53 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2471763592+378)
F webview_zygote: runtime.cc:558] native: #23 pc 001c937f /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread, art::CodeItemDataAccessor const&, art::ShadowFrame)+82)
F webview_zygote: runtime.cc:558] native: #24 pc 003d52b9 /system/lib/libart.so (artQuickToInterpreterBridge+880)
F webview_zygote: runtime.cc:558] native: #25 pc 00411aff /system/lib/libart.so (art_quick_to_interpreter_bridge+30)
I WifiService: acquireMulticastLock uid=10087
F webview_zygote: runtime.cc:558] native: #26 pc 0040d575 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
F webview_zygote: runtime.cc:558] native: #27 pc 003e6c7b /system/lib/libart.so (art_quick_invoke_static_stub+222)
F webview_zygote: runtime.cc:558] native: #28 pc 000a1027 /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const)+154)
F webview_zygote: runtime.cc:558] native: #29 pc 00347ac5 /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod, art::(anonymous namespace)::ArgArray, art::JValue, char const)+52)
F webview_zygote: runtime.cc:558] native: #30 pc 00348f15 /system/lib/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject, _jobject, _jobject*, unsigned int)+1024)
F webview_zygote: runtime.cc:558] native: #31 pc 002fb0c5 /system/lib/libart.so (art::Method_invoke(_JNIEnv, _jobject, _jobject, _jobjectArray)+40)
F webview_zygote: runtime.cc:558] native: #32 pc 0011226f /system/framework/arm/boot.oat (offset 10c000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+110)
W ctxmgr : [PendingIntentCompat]Timed out delivering to pendingIntent=PendingIntent{8dc1703: android.os.BinderProxy@4c24eee}, intent=Intent { (has extras) }, permission=null
F webview_zygote: runtime.cc:558] native: #33 pc 00a0a95b /system/framework/arm/boot-framework.oat (offset 3ab000) (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+114)
F webview_zygote: runtime.cc:558] native: #34 pc 00a10845 /system/framework/arm/boot-framework.oat (offset 3ab000) (com.android.internal.os.ZygoteInit.main+2836)
F webview_zygote: runtime.cc:558] native: #35 pc 0040d575 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
F webview_zygote: runtime.cc:558] native: #36 pc 003e6c7b /system/lib/libart.so (art_quick_invoke_static_stub+222)
F webview_zygote: runtime.cc:558] native: #37 pc 000a1027 /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const)+154)
F webview_zygote: runtime.cc:558] native: #38 pc 00347ac5 /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod, art::(anonymous namespace)::ArgArray, art::JValue, char const)+52)
F webview_zygote: runtime.cc:558] native: #39 pc 003478ef /system/lib/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject, _jmethodID, std::__va_list)+310)
F webview_zygote: runtime.cc:558] native: #40 pc 0028eb11 /system/lib/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv, _jclass, _jmethodID*, std::__va_list)+444)
F webview_zygote: runtime.cc:558] native: #41 pc 0006c99b /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass, _jmethodID, ...)+30)
F webview_zygote: runtime.cc:558] native: #42 pc 0006ebf3 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8>
F webview_zygote: runtime.cc:558] native: #43 pc 00001989 /system/bin/app_process32 (???)
F webview_zygote: runtime.cc:558] native: #44 pc 0008b89d /system/lib/libc.so (__libc_init+48)
F webview_zygote: runtime.cc:558] native: #45 pc 0000166f /system/bin/app_process32 (???)
F webview_zygote: runtime.cc:558] native: #46 pc 00000306 <anonymous:f6b51000> (???)
F webview_zygote: runtime.cc:558] at com.android.internal.os.Zygote.nativeForkAndSpecialize(Native method)
F webview_zygote: runtime.cc:558] at com.android.internal.os.Zygote.forkAndSpecialize(Zygote.java:139)
F webview_zygote: runtime.cc:558] at com.android.internal.os.ZygoteConnection.processOneCommand(ZygoteConnection.java:234)
F webview_zygote: runtime.cc:558] at com.android.internal.os.ZygoteServer.runSelectLoop(ZygoteServer.java:204)
F webview_zygote: runtime.cc:558] at com.android.internal.os.WebViewZygoteInit.main(WebViewZygoteInit.java:160)
F webview_zygote: runtime.cc:558] at java.lang.reflect.Method.invoke(Native method)
F webview_zygote: runtime.cc:558] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
F webview_zygote: runtime.cc:558] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
F webview_zygote: runtime.cc:558]
E libc : failed to connect to tombstoned: Permission denied
W webview_zygote: type=1400 audit(0.0:30): avc: denied { write } for name="tombstoned_crash" dev="tmpfs" ino=16442 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:tombstoned_crash_socket:s0 tclass=sock_file permissive=0
F DEBUG :
F DEBUG : ABI: ''arm''
F DEBUG : pid: 2332, tid: 2332, name: webview_zygote >>> webview_zygote <<<
F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
F DEBUG : Abort message: ''jni_internal.cc:616] JNI FatalError called: (com.android.webview:sandboxed_process0) Unable to stat 28''
F DEBUG : r0 00000000 r1 0000091c r2 00000006 r3 00000008
F DEBUG : r4 0000091c r5 0000091c r6 fff24e2c r7 0000010c
F DEBUG : r8 0000000d r9 f2f1c720 r10 fff24f80 r11 f2e2763e
F DEBUG : ip fff24dc8 sp fff24e18 lr f502cdd9 pc f5024c7a
D Fabric : Using AdvertisingInfo from Preference Store
I Gecko : 1538430036192 addons.xpi WARN List of valid built-in add-ons could not be parsed.: [Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIXPCComponents_Utils.readUTF8URI]" nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)" location: "JS frame :: resource://gre/modules/addons/XPIProvider.jsm :: startup :: line 197" data: no] Stack trace: startup()@resource://gre/modules/addons/XPIProvider.jsm:197
W webview_zygote: type=1400 audit(0.0:31): avc: denied { read } for name="app_process32" dev="mmcblk0p25" ino=467 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:zygote_exec:s0 tclass=file permissive=0
I unwind : Malformed section header found, ignoring...
F DEBUG :
F DEBUG : backtrace:
F DEBUG : #00 pc 0001cc7a /system/lib/libc.so (abort+58)
F DEBUG : #01 pc 0034db4f /system/lib/libart.so (art::Runtime::Abort(char const*)+910)
F DEBUG : #02 pc 000071b3 /system/lib/libbase.so (android::base::LogMessage::~LogMessage()+494)
F DEBUG : #03 pc 00265a0f /system/lib/libart.so (art::JNI::FatalError(_JNIEnv, char const)+122)
F DEBUG : #04 pc 0010b4d5 /system/lib/libandroid_runtime.so (_ZZN12_GLOBAL__N_123ForkAndSpecializeCommonEP7_JNIEnvjjP10_jintArrayiP13_jobjectArrayxxiP8_jstringS7_bS3_S3_bS7_S7_ENK3$_0clERKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEE+92)
F DEBUG : #05 pc 0010b28f /system/lib/libandroid_runtime.so ((anonymous namespace)::ForkAndSpecializeCommon(_JNIEnv, unsigned int, unsigned int, _jintArray, int, _jobjectArray, long long, long long, int, _jstring, _jstring, bool, _jintArray, _jintArray, bool, _jstring, _jstring*)+4958)
F DEBUG : #06 pc 001097f1 /system/lib/libandroid_runtime.so (android::com_android_internal_os_Zygote_nativeForkAndSpecialize(_JNIEnv, _jclass, int, int, _jintArray, int, _jobjectArray, int, _jstring, _jstring, _jintArray, _jintArray, unsigned char, _jstring, _jstring)+476)
F DEBUG : #07 pc 003cb633 /system/framework/arm/boot-framework.oat (offset 0x3ab000) (com.android.internal.os.Zygote.nativeForkAndSpecialize+338)
F DEBUG : #08 pc 00a0ba7f /system/framework/arm/boot-framework.oat (offset 0x3ab000) (com.android.internal.os.Zygote.forkAndSpecialize+198)
F DEBUG : #09 pc 00a0eb0d /system/framework/arm/boot-framework.oat (offset 0x3ab000) (com.android.internal.os.ZygoteConnection.processOneCommand+1388)
F DEBUG : #10 pc 00a13675 /system/framework/arm/boot-framework.oat (offset 0x3ab000) (com.android.internal.os.ZygoteServer.runSelectLoop+780)
F DEBUG : #11 pc 0040d575 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
F DEBUG : #12 pc 003e6b79 /system/lib/libart.so (art_quick_invoke_stub+224)
F DEBUG : #13 pc 000a1015 /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const)+136)
F DEBUG : #14 pc 001e5ae9 /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread, art::ArtMethod, art::ShadowFrame, unsigned short, art::JValue)+236)
F DEBUG : #15 pc 001e05d7 /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod, art::Thread, art::ShadowFrame&, art::Instruction const, unsigned short, art::JValue)+814)
F DEBUG : #16 pc 003e3c1d /system/lib/libart.so (MterpInvokeVirtualQuick+428)
F DEBUG : #17 pc 00404094 /system/lib/libart.so (ExecuteMterpImpl+29972)
F DEBUG : #18 pc 00dc4ff8 /system/framework/boot-framework.vdex (com.android.internal.os.WebViewZygoteInit.main+198)
F DEBUG : #19 pc 001c4d53 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2471763592+378)
F DEBUG : #20 pc 001c937f /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread, art::CodeItemDataAccessor const&, art::ShadowFrame)+82)
F DEBUG : #21 pc 003d52b9 /system/lib/libart.so (artQuickToInterpreterBridge+880)
F DEBUG : #22 pc 00411aff /system/lib/libart.so (art_quick_to_interpreter_bridge+30)
F DEBUG : #23 pc 0040d575 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
F DEBUG : #24 pc 003e6c7b /system/lib/libart.so (art_quick_invoke_static_stub+222)
F DEBUG : #25 pc 000a1027 /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const)+154)
F DEBUG : #26 pc 00347ac5 /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod, art::(anonymous namespace)::ArgArray, art::JValue, char const)+52)
F DEBUG : #27 pc 00348f15 /system/lib/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject, _jobject, _jobject*, unsigned int)+1024)
F DEBUG : #28 pc 002fb0c5 /system/lib/libart.so (art::Method_invoke(_JNIEnv, _jobject, _jobject, _jobjectArray)+40)
F DEBUG : #29 pc 0011226f /system/framework/arm/boot.oat (offset 0x10c000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+110)
F DEBUG : #30 pc 00a0a95b /system/framework/arm/boot-framework.oat (offset 0x3ab000) (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+114)
F DEBUG : #31 pc 00a10845 /system/framework/arm/boot-framework.oat (offset 0x3ab000) (com.android.internal.os.ZygoteInit.main+2836)
F DEBUG : #32 pc 0040d575 /system/lib/libart.so (art_quick_invoke_stub_internal+68)
F DEBUG : #33 pc 003e6c7b /system/lib/libart.so (art_quick_invoke_static_stub+222)
F DEBUG : #34 pc 000a1027 /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const)+154)
F DEBUG : #35 pc 00347ac5 /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod, art::(anonymous namespace)::ArgArray, art::JValue, char const)+52)
F DEBUG : #36 pc 003478ef /system/lib/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject, _jmethodID, std::__va_list)+310)
F DEBUG : #37 pc 0028eb11 /system/lib/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv, _jclass, _jmethodID*, std::__va_list)+444)
F DEBUG : #38 pc 0006c99b /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass, _jmethodID, ...)+30)
F DEBUG : #39 pc 0006ebf3 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+458)
F DEBUG : #40 pc 00001989 /system/bin/app_process32
F DEBUG : #41 pc 0008b89d /system/lib/libc.so (__libc_init+48)
F DEBUG : #42 pc 0000166f /system/bin/app_process32
F DEBUG : #43 pc 00000306 <anonymous:f6b51000>
W webview_zygote: type=1400 audit(0.0:32): avc: denied { read } for name="app_process32" dev="mmcblk0p25" ino=467 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:zygote_exec:s0 tclass=file permissive=0
E ZygoteProcess: Starting VM process through Zygote failed
I Zygote : Process 2332 exited due to signal (6)
E ActivityManager: Failure starting process com.android.webview:sandboxed_process0
E ActivityManager: java.lang.RuntimeException: Starting VM process through Zygote failed
E ActivityManager: at android.os.ZygoteProcess.start(ZygoteProcess.java:239)
E ActivityManager: at android.os.Process.startWebView(Process.java:507)
E ActivityManager: at com.android.server.am.ActivityManagerService.startProcess(ActivityManagerService.java:4478)
E ActivityManager: at com.android.server.am.ActivityManagerService.lambda$startProcessLocked$0(ActivityManagerService.java:4432)
E ActivityManager: at com.android.server.am.-$$Lambda$ActivityManagerService$UgpguyCBuObHjnmry_xkrJGkFi0.run(Unknown Source:20)
E ActivityManager: at android.os.Handler.handleCallback(Handler.java:873)
E ActivityManager: at android.os.Handler.dispatchMessage(Handler.java:99)
E ActivityManager: at android.os.Looper.loop(Looper.java:193)
E ActivityManager: at android.os.HandlerThread.run(HandlerThread.java:65)
E ActivityManager: at com.android.server.ServiceThread.run(ServiceThread.java:44)
E ActivityManager: Caused by: android.os.ZygoteStartFailedEx: java.io.EOFException
E ActivityManager: at android.os.ZygoteProcess.zygoteSendArgsAndGetResult(ZygoteProcess.java:332)
E ActivityManager: at android.os.ZygoteProcess.startViaZygote(ZygoteProcess.java:438)
E ActivityManager: at android.os.ZygoteProcess.start(ZygoteProcess.java:232)
E ActivityManager: ... 9 more
E ActivityManager: Caused by: java.io.EOFException
E ActivityManager: at java.io.DataInputStream.readFully(DataInputStream.java:200)
E ActivityManager: at java.io.DataInputStream.readInt(DataInputStream.java:389)
E ActivityManager: at android.os.ZygoteProcess.zygoteSendArgsAndGetResult(ZygoteProcess.java:323)
E ActivityManager: ... 11 more
I ActivityManager: Force stopping com.google.android.gm appid=99000 user=0: start failure
I ActivityManager: Force finishing activity ActivityRecord{ad8615d u0 com.google.android.gm/.ConversationListActivityGmail t116}
E ActivityManager: Found activity ActivityRecord{ad8615d u0 com.google.android.gm/.ConversationListActivityGmail t116 f} in proc activity list using null instead of expected ProcessRecord{f4179d8 4833:com.google.android.gm/u0a49}
Android Path菜单的简单实现,android开发软件
-
mHomeparams.width = LayoutParams.WRAP_CONTENT;
-
mHomeparams.height = LayoutParams.WRAP_CONTENT;
-
switch (position) {
-
case LEFT_TOP:
-
mHomeparams.gravity = Gravity.LEFT | Gravity.TOP;
-
for (int i = 0; i < menuResIds.length; i++) {
-
int width_padding = mWIDTH / ((menuResIds.length - 1) * 2);
-
int height_padding = mHEIGHT / ((menuResIds.length - 1) * 2);
-
ImageView imageView = new ImageView(mContext);
-
imageView.setimageResource(menuResIds[i]);
-
addView(imageView);
-
LayoutParams params = (FrameLayout.LayoutParams) imageView
-
.getLayoutParams();
-
params.width = LayoutParams.WRAP_CONTENT;
-
params.height = LayoutParams.WRAP_CONTENT;
-
params.leftMargin = mWIDTH / 2
-
- ((menuResIds.length - i - 1) * width_padding);
-
params.topMargin = mHEIGHT / 2 - i * height_padding;
-
params.gravity = Gravity.LEFT | Gravity.TOP;
-
imageView.setLayoutParams(params);
-
}
-
break;
-
case RIGHT_TOP:
-
mHomeparams.gravity = Gravity.RIGHT | Gravity.TOP;
-
for (int i = 0; i < menuResIds.length; i++) {
-
int width_padding = mWIDTH / ((menuResIds.length - 1) * 2);
-
int height_padding = mHEIGHT / ((menuResIds.length - 1) * 2);
-
ImageView imageView = new ImageView(mContext);
-
imageView.setimageResource(menuResIds[i]);
-
addView(imageView);
-
LayoutParams params = (FrameLayout.LayoutParams) imageView
-
.getLayoutParams();
-
params.width = LayoutParams.WRAP_CONTENT;
-
params.height = LayoutParams.WRAP_CONTENT;
-
params.rightMargin = mWIDTH / 2
-
- ((menuResIds.length - i - 1) * width_padding);
-
params.topMargin = mHEIGHT / 2 - i * height_padding;
-
params.gravity = Gravity.RIGHT | Gravity.TOP;
-
imageView.setLayoutParams(params);
-
}
-
break;
-
case RIGHT_BottOM:
-
mHomeparams.gravity = Gravity.RIGHT | Gravity.BottOM;
-
for (int i = 0; i < menuResIds.length; i++) {
-
int width_padding = mWIDTH / ((menuResIds.length - 1) * 2);
-
int height_padding = mHEIGHT / ((menuResIds.length - 1) * 2);
-
ImageView imageView = new ImageView(mContext);
-
imageView.setimageResource(menuResIds[i]);
-
addView(imageView);
-
LayoutParams params = (FrameLayout.LayoutParams) imageView
-
.getLayoutParams();
-
params.width = LayoutParams.WRAP_CONTENT;
-
params.height = LayoutParams.WRAP_CONTENT;
-
params.rightMargin = mWIDTH / 2
-
- ((menuResIds.length - i - 1) * width_padding);
-
params.bottomMargin = mHEIGHT / 2 - i * height_padding;
-
params.gravity = Gravity.RIGHT | Gravity.BottOM;
-
imageView.setLayoutParams(params);
-
}
-
break;
-
case LEFT_BottOM:
-
mHomeparams.gravity = Gravity.LEFT | Gravity.BottOM;
-
for(int i = 0; i < menuResIds.length; i++){
-
int width_padding = mWIDTH / ((menuResIds.length - 1) * 2);
-
int height_padding = mHEIGHT / ((menuResIds.length -1) * 2);
-
ImageView imageView = new ImageView(mContext);
-
imageView.setimageResource(menuResIds[i]);
-
addView(imageView);
-
LayoutParams params = (FrameLayout.LayoutParams)imageView.getLayoutParams();
-
params.width = LayoutParams.WRAP_CONTENT;
-
params.height = LayoutParams.WRAP_CONTENT;
-
params.leftMargin = mWIDTH / 2 - ((menuResIds.length - i - 1) * width_padding);
-
params.bottomMargin = mHEIGHT / 2 - i * height_padding;
-
params.gravity = Gravity.LEFT | Gravity.BottOM;
-
imageView.setLayoutParams(params);
-
}
-
break;
-
default:
-
break;
-
}
-
mHome.setLayoutParams(mHomeparams);
-
}
-
private OnClickListener listener = new OnClickListener() {
-
public void onClick(View v) {
-
if (!bMenuShow) {
-
startAnimationIn(PathMenuView.this, 300);
-
} else {
-
startAnimationOut(PathMenuView.this, 300);
-
}
-
bMenuShow = !bMenuShow;
-
}
-
};
-
/**
-
* 菜单隐藏动画.
-
*
-
* @param group
-
* @param duration
-
*/
-
private void startAnimationIn(ViewGroup group, int duration) {
-
for (int i = 1; i < group.getChildCount(); i++) {
-
ImageView imageview = (ImageView) group.getChildAt(i);
-
imageview.setVisibility(0);
-
MarginLayoutParams mlp = (MarginLayoutParams) imageview
-
.getLayoutParams();
-
Animation animation = null;
-
switch (position) {
-
case LEFT_TOP:
-
animation = new TranslateAnimation(0F,-mlp.leftMargin+xOffset,0F,-mlp.topMargin + yOffset);
-
break;
-
case RIGHT_TOP:
-
animation = new TranslateAnimation(mlp.rightMargin - xOffset,0F,-mlp.topMargin + yOffset,0F);
-
break;
-
case LEFT_BottOM:
-
animation = new TranslateAnimation(0F, -mlp.leftMargin+ xOffset, 0F, -yOffset + mlp.bottomMargin);
-
break;
-
case RIGHT_BottOM:
-
animation = new TranslateAnimation(mlp.rightMargin-xOffset,0F,-yOffset + mlp.bottomMargin, 0F);
-
break;
-
default:
-
break;
-
}
-
animation.setFillAfter(true);
-
animation.setDuration(duration);
-
animation.setStartOffset((i * 100) / (-1 + group.getChildCount()));
-
animation.setInterpolator(new OvershootInterpolator(2F));
-
imageview.startAnimation(animation);
-
}
-
}
-
/**
-
* 菜单显示动画.
-
*
-
* @param group
-
* @param duration
-
*/
-
private void startAnimationOut(ViewGroup group,int duration){
-
for (int i = 1; i < group.getChildCount(); i++) {
-
final ImageView imageview = (ImageView) group
-
.getChildAt(i);
-
MarginLayoutParams mlp = (MarginLayoutParams) imageview.getLayoutParams();
-
Animation animation = null;
-
switch (position) {
-
case LEFT_TOP:
-
animation = new TranslateAnimation(-mlp.leftMargin+xOffset,0F,-mlp.topMargin + yOffset,0F);
-
break;
-
case RIGHT_TOP:
-
animation = new TranslateAnimation(0F,mlp.rightMargin - xOffset,0F,-mlp.topMargin + yOffset);
-
break;
-
case LEFT_BottOM:
-
animation = new TranslateAnimation(-mlp.leftMargin+xOffset,0F, -yOffset + mlp.bottomMargin,0F);
-
break;
-
case RIGHT_BottOM:
-
animation = new TranslateAnimation(0F,mlp.rightMargin-xOffset, 0F,-yOffset + mlp.bottomMargin);
-
break;
-
default:
-
break;
-
}
-
animation.setFillAfter(true);animation.setDuration(duration);
-
animation.setStartOffset(((group.getChildCount()-i) * 100)
-
/ (-1 + group.getChildCount()));
-
animation.setInterpolator(new AnticipateInterpolator(2F));
-
imageview.startAnimation(animation);
-
}
-
}
-
}
第四步:PathTestActivity.java以及用到的布局文件main.xml代码如下:
PathTestActivity.java(基本没修改代码)代码如下:
[java] view plain copy
-
package com.tutor.path;
-
import android.app.Activity;
-
import android.os.Bundle;
-
public class PathTestActivity extends Activity {
-
@Override
-
public void onCreate(Bundle savedInstanceState) {
-
super.onCreate(savedInstanceState);
-
setContentView(R.layout.main);
-
}
-
}
main.xml代码如下:
[java] view plain copy
- <?xml version="1.0" encoding="utf-8"?>
-
<LinearLayout xmlns:android=“http://schemas.android.com/apk/res/android”
-
xmlns:tutor=“http://schemas.android.com/apk/res/com.tutor.path”
-
android:layout_width=“fill_parent”
-
android:layout_height=“fill_parent”
-
android:orientation=“vertical” >
-
<com.tutor.path.PathMenuView
-
android:id="@+id/text"
-
android:layout_width=“fill_parent”
-
android:layout_height=“fill_parent”
-
tutor:position=“right_bottom”
-
/>
最后
下面是辛苦给大家整理的学习路线
-
android:layout_height=“fill_parent”
-
android:orientation=“vertical” >
-
<com.tutor.path.PathMenuView
-
android:id="@+id/text"
-
android:layout_width=“fill_parent”
-
android:layout_height=“fill_parent”
-
tutor:position=“right_bottom”
-
/>
最后
下面是辛苦给大家整理的学习路线
[外链图片转存中…(img-cse5ggaX-1643518121306)]
本文已被CODING开源项目:《Android学习笔记总结+移动架构视频+大厂面试真题+项目实战源码》收录
android sdk需要android开发者工具包版本22.6.1或以上[复制]
ADT打开时显示错误消息:
“android SDK需要ADT 22.6.1或更高版本”
以下更新ADT的方法失败:
>使用SDK管理器更新ADT插件
>转到帮助 – >安装新软件 – >选择Android开发者网站 – >更新开发者工具
安装新软件失败,但有异常:
An error occurred while collecting items to be installed session context was:(profile=profile,phase=org.eclipse.equinox.internal.p2.engine.phases.Collect,operand=,action=). No repository found containing: osgi.bundle,com.android.ide.eclipse.adt,22.6.0.v201403010043-1049357 No repository found containing: osgi.bundle,com.android.ide.eclipse.adt.package,com.android.ide.eclipse.base,com.android.ide.eclipse.ddms,com.android.ide.eclipse.gldebugger,com.android.ide.eclipse.hierarchyviewer,com.android.ide.eclipse.ndk,com.android.ide.eclipse.traceview,overlay.com.android.ide.eclipse.adt.overlay,22.6.0.v201403010043-1049357 No repository found containing: org.eclipse.update.feature,22.6.0.v201403010043-1049357
解决方法
我们今天的关于Android开发-软件版本升级与黑暗模式的适配【Android 10】和安卓黑暗模式app的分享已经告一段落,感谢您的关注,如果您想了解更多关于Android 10 和Android 11的适配、android app内置webview,随android版本升级进程关系的变化、Android Path菜单的简单实现,android开发软件、android sdk需要android开发者工具包版本22.6.1或以上[复制]的相关信息,请在本站查询。
本文标签: