WAI
Status Update
Comments
a....@gmail.com <a....@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit b9b1326edfe38588a9882e1ee624798966c5686a
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Oct 06 16:49:53 2021
Clear focus on Fragments animating out
Since moving to the new state manager, fragment now explicitly handle
focus where in the old world they could ignore it altogether. This
change has the side effect that other things affected by focus (i.e.
soft keyboard input) are affect as well. In particular when we
requestFocus we update the input request, but since we never clear it
users have to manually remove the input.
When we are animating a fragment view out, since we will no longer be
using the exiting view, let clear the focus of before we remove it from
the fragment.
RelNote: "The keyboard will now close automatically when going from
a fragment with an open keyboard to a fragment with a recycler view."
Test: tested in sample app from bug
Bug: 196852211
Change-Id: I8b842dd9a421cfbc9189014b802f5e4b6b9c2a47
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
https://android-review.googlesource.com/1847143
Branch: androidx-main
commit b9b1326edfe38588a9882e1ee624798966c5686a
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Oct 06 16:49:53 2021
Clear focus on Fragments animating out
Since moving to the new state manager, fragment now explicitly handle
focus where in the old world they could ignore it altogether. This
change has the side effect that other things affected by focus (i.e.
soft keyboard input) are affect as well. In particular when we
requestFocus we update the input request, but since we never clear it
users have to manually remove the input.
When we are animating a fragment view out, since we will no longer be
using the exiting view, let clear the focus of before we remove it from
the fragment.
RelNote: "The keyboard will now close automatically when going from
a fragment with an open keyboard to a fragment with a recycler view."
Test: tested in sample app from bug
Bug: 196852211
Change-Id: I8b842dd9a421cfbc9189014b802f5e4b6b9c2a47
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
ra...@gmail.com <ra...@gmail.com> #3
This has been fixed internally and will be available in the Fragment 1.4.0-beta01
release.
gf...@gmail.com <gf...@gmail.com> #4
The issue still persist in API version 27 and below in Fragment 1.4.0
gf...@gmail.com <gf...@gmail.com> #5
'packagingOptions' doesn't work in my project.it works on Android Studio version 1.5
Error:Execution failed for task ':dangkrcore:transformResourcesWithMergeJavaResForRelease'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE.txt
File1: /Users/linjizong/Project/dangkr-android-as/dangkrcore/libs/httpmime-4.1.3.jar
File2: /Users/linjizong/Project/dangkr-android-as/dangkrcore/libs/commons-httpclient-3.1.jar
Error:Execution failed for task ':dangkrcore:transformResourcesWithMergeJavaResForRelease'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE.txt
File1: /Users/linjizong/Project/dangkr-android-as/dangkrcore/libs/httpmime-4.1.3.jar
File2: /Users/linjizong/Project/dangkr-android-as/dangkrcore/libs/commons-httpclient-3.1.jar
[Deleted User] <[Deleted User]> #6
This is also happenning using Guava and espresso-core
AS: 2.0 preview
Java: 1.7
Gradle plugin: 2.0.0-alpha1
Execution failed for task ':app:transformResourcesWithMergeJavaResForDevDebugAndroidTest'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.google.guava/guava/pom.properties
File1: /Users/me/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/18.0/cce0823396aa693798f8882e64213b1772032b09/guava-18.0.jar
File2: /Users/me/Documents/android_workspace/MyApp/app/build/intermediates/exploded-aar/com.android.support.test.espresso/espresso-core/2.2/jars/classes.jar
As OP suggested, adding the two exclude lines to packaging options solves the problem
packagingOptions {
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
}
AS: 2.0 preview
Java: 1.7
Gradle plugin: 2.0.0-alpha1
Execution failed for task ':app:transformResourcesWithMergeJavaResForDevDebugAndroidTest'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.google.guava/guava/pom.properties
File1: /Users/me/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/18.0/cce0823396aa693798f8882e64213b1772032b09/guava-18.0.jar
File2: /Users/me/Documents/android_workspace/MyApp/app/build/intermediates/exploded-aar/com.android.support.test.espresso/espresso-core/2.2/jars/classes.jar
As OP suggested, adding the two exclude lines to packaging options solves the problem
packagingOptions {
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
}
xa...@android.com <xa...@android.com> #7
This is normal. We have fixed a set of issues regarding to packaging of the java resources.
The right fix is to fix the libraries so that they don't package the pom from the libraries they embed. I'll file a bug for espresso regarding this. Someone may want to do the same for crashlytics.
The right fix is to fix the libraries so that they don't package the pom from the libraries they embed. I'll file a bug for espresso regarding this. Someone may want to do the same for crashlytics.
[Deleted User] <[Deleted User]> #9
I am having the same issue right now in Android Studio 2.0 beta 6. Getting this error:
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebugAndroidTest'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.google.guava/guava/pom.properties
File1: /Users/eazyigz/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/18.0/cce0823396aa693798f8882e64213b1772032b09/guava-18.0.jar
File2: /Users/eazyigz/git/personal/RussianVideoSearch/app/build/intermediates/exploded-aar/com.android.support.test.espresso/espresso-core/2.2.1/jars/classes.jar
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebugAndroidTest'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.google.guava/guava/pom.properties
File1: /Users/eazyigz/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/18.0/cce0823396aa693798f8882e64213b1772032b09/guava-18.0.jar
File2: /Users/eazyigz/git/personal/RussianVideoSearch/app/build/intermediates/exploded-aar/com.android.support.test.espresso/espresso-core/2.2.1/jars/classes.jar
[Deleted User] <[Deleted User]> #10
The solution is to use this in build.gradle:
packagingOptions {
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
}
As outlined here:https://code.google.com/p/android/issues/detail?id=195331#makechanges
packagingOptions {
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
}
As outlined here:
an...@gmail.com <an...@gmail.com> #11
Same issue in Stable version 2.0
[Deleted User] <[Deleted User]> #12
same issue is stable version of 2.0
ih...@gmail.com <ih...@gmail.com> #13
Same issues with these files
com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/org.apache.httpcomponents/httpmime/pom.xml
File1: /Users/muhammadbilal/gazuntitepatient/app/libs/common-http-26.jar
File2: /Users/muhammadbilal/gazuntitepatient/app/libs/httpmime-4.3.5.jar
com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/org.apache.httpcomponents/httpmime/pom.xml
File1: /Users/muhammadbilal/gazuntitepatient/app/libs/common-http-26.jar
File2: /Users/muhammadbilal/gazuntitepatient/app/libs/httpmime-4.3.5.jar
dv...@gmail.com <dv...@gmail.com> #14
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK com/google/appengine/repackaged/org/apache/commons/codec/language/bm/sep_approx_spanish.txt
also here : what to do?
File1: C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.appengine\appengine-api-1.0-sdk\1.9.34\7c15c22fd362478e9758081d28e51590304d5ff4\appengine-api-1.0-sdk-1.9.34.jar
File2: C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.appengine\appengine-endpoints\1.9.34\4854813d73f2b5bc6ebde04b156d2fe7a9e4aceb\appengine-endpoints-1.9.34.jar
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK com/google/appengine/repackaged/org/apache/commons/codec/language/bm/sep_approx_spanish.txt
also here : what to do?
File1: C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.appengine\appengine-api-1.0-sdk\1.9.34\7c15c22fd362478e9758081d28e51590304d5ff4\appengine-api-1.0-sdk-1.9.34.jar
File2: C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.appengine\appengine-endpoints\1.9.34\4854813d73f2b5bc6ebde04b156d2fe7a9e4aceb\appengine-endpoints-1.9.34.jar
be...@gmail.com <be...@gmail.com> #15
Same here in android studio 2.2 preview 3 version. It seems it is because of the usage of espresso, since the same project didn't give any error before espresso usage.
I had this as a solution.
packagingOptions{
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/maven/com.squareup/javawriter/pom.properties'
exclude 'META-INF/maven/com.squareup/javawriter/pom.xml'
}
I had this as a solution.
packagingOptions{
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/maven/com.squareup/javawriter/pom.properties'
exclude 'META-INF/maven/com.squareup/javawriter/pom.xml'
}
dv...@gmail.com <dv...@gmail.com> #16
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/mailcap.default
File1: C:\Users\ankit.KLASSIFY.000\.gradle\caches\modules-2\files-2.1\com.sun.mail\android-activation\1.6.0-rc1\262ff9b08ed748c74889e6980fcad0c7c8ee128\android-activation-1.6.0-rc1.jar
File2: C:\Users\ankit.KLASSIFY.000\.gradle\caches\modules-2\files-2.1\javax.activation\activation\1.1\e6cb541461c2834bdea3eb920f1884d1eb508b50\activation-1.1.jar
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/mailcap.default
File1: C:\Users\ankit.KLASSIFY.000\.gradle\caches\modules-2\files-2.1\com.sun.mail\android-activation\1.6.0-rc1\262ff9b08ed748c74889e6980fcad0c7c8ee128\android-activation-1.6.0-rc1.jar
File2: C:\Users\ankit.KLASSIFY.000\.gradle\caches\modules-2\files-2.1\javax.activation\activation\1.1\e6cb541461c2834bdea3eb920f1884d1eb508b50\activation-1.1.jar
Description
Java: 1.8.0_65-b17x64 Oracle Corporation
OS: Windows 7(amd64) v6.1 Service Pack 1 (1920x1200, 1920x1200)
Gradle version: 2.8
Android Plugin Version: 2.0.0-alpha1
SDK Version: 24.4.1
Module Compile Sdk Version: API 22
Module Build Tools Version: 23.0.2
****
I updated to the latest preview build of Android Studio and during the build process (with "instant build" enabled) for my project, received this error:
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.squareup.okhttp/okhttp/pom.properties
File1: C:\Users\kyleparker\.gradle\caches\modules-2\files-2.1\
File2: C:\Users\kyleparker\.gradle\caches\modules-2\files-2.1\com.squareup.okhttp\okhttp\2.4.0\40340c0748190fe897baf7bffbc1b282734294e5\okhttp-2.4.0.jar
****
The project compiled properly on Android Studio version 1.5, Gradle plugin 2.2.1.
In order to circumvent the problem, I had to add this to my build.gradle for the project:
packagingOptions {
exclude 'META-INF/maven/com.squareup.okhttp/okhttp/pom.properties'
exclude 'META-INF/maven/com.squareup.okhttp/okhttp/pom.xml'
}