AS Android开发 错误集锦

一、 项目依赖库和主程序的allowBackup冲突:  Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@allowBackup value=(true) from AndroidManifest.xml:39:9-35
is also present at [:CloudFaceVerifySdk-proRelease-v1.3.6-3cb4c80:] AndroidManifest.xml:25:9-36 value=(false).

Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:37:5-255:19 to override.

解决办法:

<application
     android:name=".PHApplication"
     android:allowBackup="true"
     android:icon="@mipmap/logo_icon"
     android:label="@string/app_name"
     android:supportsRtl="true"
     android:theme="@style/AppTheme"
     tools:replace="android:allowBackup">


二、aar文件 Failed to resolve

可尝试

	//这样设置可以找到.aar文件的路径
	repositories {
    	    flatDir {
        	dirs 'libs' //this way we can find the .aar file in libs folder
    	    }
	}

三、Didn't find class "" on path: DexPathList 错误

解决方法:可尝试把module的build文件夹删除再clean,然后运行;如果还是不行,再试试把两个build

(app build以及项目build)都删掉,然后运行,一般都能够解决问题的。

扫描二维码关注公众号,回复: 182740 查看本文章

四、E/dalvikvm: Could not find class 'android.app.usage.UsageStatsManager', referenced from method......

解决方法: 把这里的钩钩去掉即可




猜你喜欢

转载自blog.csdn.net/tang_jian_1228/article/details/71079756