我正在制作一个注册表单应用程序,一切正常,直到我在XML中添加ImageView代码,然后在尝试运行它时出现运行错误。没有编译错误,代码在没有ImageView代码的情况下工作正常,但是一旦添加了代码,程序就会崩溃。请帮助任何建议表示赞赏。以下是我得到的日志聊天错误。
1284/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-en-us.pat.txt
java.io.FileNotFoundException: /system/usr/hyphen-data/hyph-en-us.pat.txt: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
05-24 20:35:23.918 1284-1284/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-eu.pat.txt
java.io.FileNotFoundException: /system/usr/hyphen-data/hyph-eu.pat.txt: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
05-24 20:35:23.921 1284-1284/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-hu.pat.txt
java.io.FileNotFoundException: /system/usr/hyphen-data/hyph-hu.pat.txt: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
05-24 20:35:23.922 1284-1284/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-hy.pat.txt
java.io.FileNotFoundException: /system/usr/hyphen-data/hyph-hy.pat.txt: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
05-24 20:35:23.924 1284-1284/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-nb.pat.txt
java.io.FileNotFoundException: /system/usr/hyphen-data/hyph-nb.pat.txt: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
05-24 20:35:23.927 1284-1284/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-nn.pat.txt
java.io.FileNotFoundException: /system/usr/hyphen-data/hyph-nn.pat.txt: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
05-24 20:35:23.927 1284-1284/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-sa.pat.txt
java.io.FileNotFoundException: /system/usr/hyphen-data/hyph-sa.pat.txt: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
05-24 20:35:23.928 1284-1284/? E/Hyphenator: error loading hyphenation /system/usr/hyphen-data/hyph-und-ethi.pat.txt
java.io.FileNotFoundException: /system/usr/hyphen-data/hyph-und-ethi.pat.txt: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at libcore.io.IoUtils$FileReader.<init>(IoUtils.java:207)
at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
at android.text.Hyphenator.loadHyphenator(Hyphenator.java:96)
at android.text.Hyphenator.init(Hyphenator.java:154)
at com.android.internal.os.ZygoteInit.preloadTextResources(ZygoteInit.java:207)
at com.android.internal.os.ZygoteInit.preload(ZygoteInit.java:186)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
05-24 20:35:30.674 1609-1625/? E/WebViewFactory: error preparing webview native library
android.webkit.WebViewFactory$MissingWebViewPackageException: android.content.pm.PackageManager$NameNotFoundException: com.android.webview
at android.webkit.WebViewFactory.fetchPackageInfo(WebViewFactory.java:109)
at android.webkit.WebViewFactory.getWebViewApplicationInfo(WebViewFactory.java:116)
at android.webkit.WebViewFactory.getWebViewNativeLibraryPaths(WebViewFactory.java:374)
at android.webkit.WebViewFactory.prepareWebViewInSystemServer(WebViewFactory.java:274)
at com.android.server.SystemServer$2.run(SystemServer.java:1106)
at com.android.server.am.ActivityManagerService.systemReady(ActivityManagerService.java:11780)
at com.android.server.am.ActivityManagerService$13.run(ActivityManagerService.java:11691)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
Caused by: android.content.pm.PackageManager$NameNotFoundException: com.android.webview
at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:137)
at android.webkit.WebViewFactory.fetchPackageInfo(WebViewFactory.java:107)
at android.webkit.WebViewFactory.getWebViewApplicationInfo(WebViewFactory.java:116)
at android.webkit.WebViewFactory.getWebViewNativeLibraryPaths(WebViewFactory.java:374)
at android.webkit.WebViewFactory.prepareWebViewInSystemServer(WebViewFactory.java:274)
at com.android.server.SystemServer$2.run(SystemServer.java:1106)
at com.android.server.am.ActivityManagerService.systemReady(ActivityManagerService.java:11780)
at com.android.server.am.ActivityManagerService$13.run(ActivityManagerService.java:11691)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
05-24 20:35:30.674 1609-1625/? E/WebViewFactory: error starting relro file creator for abi x86
java.lang.IllegalArgumentException: Native library paths to the WebView RelRo process must not be null!
at android.webkit.WebViewFactory.createRelroFile(WebViewFactory.java:446)
at android.webkit.WebViewFactory.prepareWebViewInSystemServer(WebViewFactory.java:290)
at android.webkit.WebViewFactory.prepareWebViewInSystemServer(WebViewFactory.java:279)
at com.android.server.SystemServer$2.run(SystemServer.java:1106)
at com.android.server.am.ActivityManagerService.systemReady(ActivityManagerService.java:11780)
at com.android.server.am.ActivityManagerService$13.run(ActivityManagerService.java:11691)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
05-24 20:35:30.674 1609-1625/? E/WebViewFactory: relro file creator for x86 crashed. Proceeding without
我的布局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.issac_rodriguez.register.MainActivity"
android:background="@android:color/holo_blue_bright">
<EditText
android:id="@+id/etName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginTop="18dp"
android:ems="10"
android:hint="NAME"
android:inputType="textPersonName"
tools:layout_editor_absoluteX="58dp"
tools:layout_editor_absoluteY="42dp" />
<EditText
android:id="@+id/etEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/etPhone"
android:layout_marginTop="38dp"
android:ems="10"
android:hint="EMAIL"
android:inputType="textPersonName" />
<EditText
android:id="@+id/etPhone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/etName"
android:layout_marginTop="29dp"
android:ems="10"
android:hint="PHONE"
android:inputType="textPersonName" />
<Button
android:id="@+id/btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/etTime"
android:layout_marginLeft="52dp"
android:layout_marginStart="52dp"
android:layout_marginTop="81dp"
android:text="Register!!" />
<EditText
android:id="@+id/etTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/etEmail"
android:layout_marginTop="123dp"
android:ems="10"
android:hint="TIME "
android:inputType="textPersonName" />
<EditText
android:id="@+id/etDay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/etEmail"
android:layout_marginTop="35dp"
android:ems="10"
android:hint="DAY"
android:inputType="textPersonName" />
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/etTime"
android:layout_marginEnd="75dp"
android:layout_marginRight="75dp"
android:layout_marginTop="24dp"
android:src="@drawable/donate_" />
</RelativeLayout>