Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
370 views
in Technique[技术] by (71.8m points)

android - Getting "W/art Failed execv" error when I add an 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@[email protected]@[email protected]) because non-0 exit status

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

<?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>

error:

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@[email protected]@[email protected]) 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@[email protected]@[email protected]) 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@[email protected]@[email protected]) 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@[email protected]@[email protected]) 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@[email protected]@[email protected]) 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@[email protected]@[email protected]) 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@[email protected]@[email protected]) 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@[email protected]@[email protected]) 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@[email protected]@[email protected]) 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@[email protected]@[email protected]) 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@[email protected]@[email protected]) 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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In your Gradle file set vectorDrawables.useSupportLibrary = true

android {  
defaultConfig {  
 vectorDrawables.useSupportLibrary = true  
}  
}  

change ImageView to android.support.v7.widget.AppCompatImageView

  <android.support.v7.widget.AppCompatImageView
    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" />

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...