将微光布局添加到我的android项目后,我收到此错误。
我尝试在build.gradle(模块:app)中编辑我的PackagingOptions,但没有用。
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/rxjava.properties'
}
这是我布局中的xml代码。
<com.facebook.shimmer.ShimmerFrameLayout
android:id="@+id/shimmerUserProfileActivity"
android:layout_width="wrap_content"
app:shimmer_shape="radial"
app:shimmer_duration="800"
app:shimmer_auto_start="true"
app:shimmer_repeat_mode="restart"
android:layout_height="wrap_content">
<include layout="@layout/layout_shimmer_user_profile"/>
</com.facebook.shimmer.ShimmerFrameLayout>
项目显示此错误。
答案 0 :(得分:1)
我没有尝试过,但是:
android {
packagingOptions {
pickFirst 'lib/armeabi-v7a/libRSSupport.so'
}
}
我在这里找到了类似的东西:
答案 1 :(得分:0)
这有效。
android{
packagingOptions{
pickFirst 'lib/mips/libRSSupport.so'
pickFirst 'lib/x86/libRSSupport.so'
pickFirst 'lib/mips/librsjni.so'
pickFirst 'lib/x86/librsjni.so'
pickFirst 'lib/armeabi-v7a/libRSSupport.so'
pickFirst 'lib/armeabi-v7a/librsjni.so'
}
}
这是包装选项的完整代码。
android{
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/rxjava.properties'
pickFirst 'lib/mips/libRSSupport.so'
pickFirst 'lib/x86/libRSSupport.so'
pickFirst 'lib/mips/librsjni.so'
pickFirst 'lib/x86/librsjni.so'
pickFirst 'lib/armeabi-v7a/libRSSupport.so'
pickFirst 'lib/armeabi-v7a/librsjni.so'
pickFirst 'lib/x86_64/libsqlcipher.so'
pickFirst 'lib/armeabi/libsqlcipher.so'
pickFirst 'lib/x86/libsqlcipher.so'
pickFirst 'lib/armeabi-v7a/libsqlcipher.so'
pickFirst 'lib/arm64-v8a/libsqlcipher.so'
pickFirst 'lib/armeabi-v7a/libassmidi.so'
pickFirst 'lib/x86/libassmidi.so'
}
}
我注意到该问题并不是由微光布局真正引起的。这是因为即使删除了所有闪烁的声明,实现并重建了我的项目,问题仍然存在。希望这会有所帮助。