1. 程式人生 > >Error:Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'. > More than one

Error:Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'. > More than one

錯誤異常
Error:Execution failed for task ‘:app:transformNativeLibsWithMergeJniLibsForDebug’.

More than one file was found with OS independent path ‘lib/armeabi-v7a/libgnustl_shared.so’

解決方案:
在APP model 中加入忽略

android {
	defaultConfig {
			......
	        packagingOptions {
	            exclude 'lib/arm64-v8a/libgnustl_shared.so'
	            exclude 'lib/armeabi-v7a/libgnustl_shared.so'
	            //或者
            	 pickFirst 'lib/arm64-v8a/libgnustl_shared.so'
                pickFirst 'lib/armeabi-v7a/libgnustl_shared.so'
         
	    }
}