获取“W/art Failed execv"添加 ImageView 时出错 [英] Getting "W/art Failed execv" error when I add an ImageView

查看:22
本文介绍了获取“W/art Failed execv"添加 ImageView 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始了一个新项目,它运行良好.然后我从我的可绘制对象中添加一个 ImageView ,然后引发此错误:

I just started a new project, and it runs fine. Then I add an ImageView from my drawable which then raises this error:

03-20 15:54:28.711 25633-25633/com.example.zorgan.app W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.example.zorgan.app-1/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.example.zorgan.app-1@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status

知道是什么问题吗?这是一个全新的项目,所以不确定出了什么问题.这是我的 activity_main.xml:

Any idea what the problem is? It's a brand new project so not sure what's wrong. Here's my activity_main.xml:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:background="#333"

    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.zorgan.app.MainActivity">


    <ImageView
        android:id="@+id/imageView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/street" />
</android.support.constraint.ConstraintLayout>

AndroidManifest.xml

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.zorgan.app" >

    <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/Theme.AppCompat.NoActionBar" >
        <activity android:name=".MainActivity" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

错误:

03-20 16:25:37.981 27866-27866/com.example.zorgan.app W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.example.zorgan.app-1/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.example.zorgan.app-1@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
03-20 16:25:38.181 27866-27866/com.example.zorgan.app W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.example.zorgan.app-1/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.example.zorgan.app-1@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status
03-20 16:25:38.271 27866-27866/com.example.zorgan.app W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.example.zorgan.app-1/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.example.zorgan.app-1@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
03-20 16:25:38.371 27866-27866/com.example.zorgan.app W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.example.zorgan.app-1/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.example.zorgan.app-1@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
03-20 16:25:38.481 27866-27866/com.example.zorgan.app W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.example.zorgan.app-1/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.example.zorgan.app-1@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
03-20 16:25:38.571 27866-27866/com.example.zorgan.app W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.example.zorgan.app-1/split_lib_slice_4_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.example.zorgan.app-1@split_lib_slice_4_apk.apk@classes.dex) because non-0 exit status
03-20 16:25:38.671 27866-27866/com.example.zorgan.app W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.example.zorgan.app-1/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.example.zorgan.app-1@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
03-20 16:25:38.761 27866-27866/com.example.zorgan.app W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.example.zorgan.app-1/split_lib_slice_6_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.example.zorgan.app-1@split_lib_slice_6_apk.apk@classes.dex) because non-0 exit status
03-20 16:25:38.881 27866-27866/com.example.zorgan.app W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.example.zorgan.app-1/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.example.zorgan.app-1@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
03-20 16:25:38.981 27866-27866/com.example.zorgan.app W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.example.zorgan.app-1/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.example.zorgan.app-1@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status
03-20 16:25:39.071 27866-27866/com.example.zorgan.app W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.example.zorgan.app-1/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.example.zorgan.app-1@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status
03-20 16:25:39.081 27866-27866/com.example.zorgan.app W/System: ClassLoader referenced unknown path: /data/app/com.example.zorgan.app-1/lib/arm64

推荐答案

我遇到了同样的问题,修复它的解决方案是删除

I had the same problem and the solution that fixed it, was to remove

android:name="android.support.multidex.MultiDexApplication"

来自

<application>

更新

如果您的应用由于其他原因需要上述内容,您可以添加以下依赖项:

In case the above is necessary to your app for some other reason you can add in dependencies the following:

compile 'com.android.support:multidex:1.0.0'

此错误的另一个原因是我的布局 xml 文件中缺少一些元素.添加它们后,我的应用程序停止崩溃并显示此错误

Another cause of this error were some missing elements from my layout xml file. Once I added them my app stopped crashing and showing this error

这篇关于获取“W/art Failed execv"添加 ImageView 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆