Skip to content Skip to sidebar Skip to footer

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:

Solution 1:

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

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

from

<application>

Update

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'

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

Solution 2:

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" />

Solution 3:

Go to File-->Invalided Caches/Restart.... its

Post a Comment for "Getting "w/art Failed Execv" Error When I Add An Imageview"