When I updated Fresco to 1.7.0,compilation got an error。
this is my error log:
Information:Gradle tasks [clean, :app:assembleDebug]
/Users/listenergao/AndroidStudio_Project/MyApplication2/app/src/main/res/layout/item_layout.xml
Error:error: attribute 'com.listenergao.myapplication2:placeholderImage' not found.
Error:attribute 'com.listenergao.myapplication2:placeholderImage' not found.
Error:failed linking file resources.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
Information:BUILD FAILED in 1s
Information:7 errors
Information:0 warnings
Information:See complete output in console
Use the following configuration:
app/build.gradle:
compile 'com.facebook.fresco:fresco:1.7.0'
Application:
Fresco.initialize(this);
xml content:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@android:color/darker_gray">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/my_image_view"
android:layout_width="60dp"
android:layout_height="match_parent"
fresco:placeholderImage="@mipmap/ic_launcher" />
<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null" />
</LinearLayout>
To add to this, it seems that 1.7.0 deployed a bad artifact. Most classes are missing from it.
SimpleDraweeView etc are not packaged in.
I am only seeing these classes:

Downgrading to 1.5.0 works
I guess 1.7.0 dependancy is broken by update to gradle ( compile -> implements ).
So, added below dependancy. and It's working!
implementation 'com.parse.bolts:bolts-tasks:1.4.0'
implementation "com.facebook.fresco:fbcore:1.7.0"
implementation "com.facebook.fresco:animated-base:1.7.0"
implementation "com.facebook.fresco:animated-drawable:1.7.0"
implementation "com.facebook.fresco:imagepipeline-base:1.7.0"
implementation "com.facebook.fresco:imagepipeline:1.7.0"
implementation "com.facebook.fresco:drawee:1.7.0"
implementation "com.facebook.fresco:fresco:1.7.0"
折腾一上午,不靠谱啊 ,准备弃用了
@dansaka 別啊,這是1.7.0的問題,我用1.5.0用得很開心
Looks like the POM file is being incorrectly generated. Looking at fresco-1.7.0.pom all the dependencies are missing. As @codguru points out it is likely do to changing compile to implements/api.
Dependencies for 1.7:
./gradlew :app:dependencies --configuration releaseCompileClasspath
> Task :app:dependencies
------------------------------------------------------------
Project :app
------------------------------------------------------------
releaseCompileClasspath - Resolved configuration for compilation for variant: release
...
+--- com.facebook.fresco:fresco:1.7.0
+--- com.facebook.fresco:stetho:1.7.0
Dependencies for 1.4:
./gradlew :app:dependencies --configuration releaseCompileClasspath
> Task :app:dependencies
------------------------------------------------------------
Project :app
------------------------------------------------------------
releaseCompileClasspath - Resolved configuration for compilation for variant: release
...
+--- com.facebook.fresco:fresco:1.4.0
| +--- com.facebook.fresco:drawee:1.4.0
| | \--- com.facebook.fresco:fbcore:1.4.0
| +--- com.facebook.fresco:fbcore:1.4.0
| \--- com.facebook.fresco:imagepipeline:1.4.0
| +--- com.parse.bolts:bolts-tasks:1.4.0
| +--- com.facebook.fresco:fbcore:1.4.0
| \--- com.facebook.fresco:imagepipeline-base:1.4.0
| +--- com.parse.bolts:bolts-tasks:1.4.0
| \--- com.facebook.fresco:fbcore:1.4.0
+--- com.facebook.fresco:stetho:1.4.0
| +--- com.facebook.stetho:stetho:1.3.1
| | +--- com.google.code.findbugs:jsr305:2.0.1
| | \--- commons-cli:commons-cli:1.2
| +--- com.facebook.fresco:fresco:1.4.0 (*)
| +--- com.facebook.fresco:fbcore:1.4.0
| +--- com.facebook.fresco:imagepipeline:1.4.0 (*)
| \--- com.facebook.fresco:imagepipeline-base:1.4.0 (*)
Looks like the android-maven-gradle-plugin needs to be updated to v2.0.
Whoops, this is my bad. I've updated the release details with a link to this issue. I'll have a look tomorrow and push another release.
@efrohnhoefer do you think the plugin update is enough to fix everything? I would've thought some implementation -> api dependency changes would be necessary as well.
So I bumped the version to 1.8.0 and added a local repo to my test project.
maven {
url uri('file:///Users/foo/workspace/libs')
}
I was able to successfully build my simple test project. I don't think any additional changes are required but my testing was limited. Also dependencies seem to be the same.
+--- com.facebook.fresco:fresco:1.8.0
| +--- com.facebook.fresco:fbcore:1.8.0
| +--- com.facebook.fresco:drawee:1.8.0
| | \--- com.facebook.fresco:fbcore:1.8.0
| \--- com.facebook.fresco:imagepipeline:1.8.0
| +--- com.facebook.fresco:imagepipeline-base:1.8.0
| | +--- com.parse.bolts:bolts-tasks:1.4.0
| | \--- com.facebook.fresco:fbcore:1.8.0
| +--- com.parse.bolts:bolts-tasks:1.4.0
| \--- com.facebook.fresco:fbcore:1.8.0
+--- com.facebook.fresco:stetho:1.8.0
| +--- com.facebook.stetho:stetho:1.3.1
| | +--- com.google.code.findbugs:jsr305:2.0.1
| | \--- commons-cli:commons-cli:1.2
| +--- com.facebook.fresco:fresco:1.8.0 (*)
| +--- com.facebook.fresco:fbcore:1.8.0
| +--- com.facebook.fresco:imagepipeline:1.8.0 (*)
| \--- com.facebook.fresco:imagepipeline-base:1.8.0 (*)
Most helpful comment
To add to this, it seems that 1.7.0 deployed a bad artifact. Most classes are missing from it.
SimpleDraweeView etc are not packaged in.
I am only seeing these classes:
Downgrading to 1.5.0 works