Error:(5, 24) Color value not valid -- must be #rgb, #argb, #rrggbb, or #aarrggbb (at 'color' with value '#ff275FAE ').
很明显的问题,color值写错了,多写了一个空格Could not find method google() for arguments [] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.
缺少gradle-wrapper.properties 或者该文件中没有指定distributionUrl
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 7 declared in library [com.android.support:appcompat-v7:24.1.0]
android:minSdkVersion 过低intermediates\res\merged\debug\values-v23\values-v23.xml Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'. Error:(34) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'. Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
这种是因为compileSdkVersion 与buildToolsVersion版本不一致
5. 如果想调用系统中hide的方法
def getLayoutLibPath() {
return "${android.getSdkDirectory().getAbsolutePath()}" + "/platforms/" +
android.compileSdkVersion +"/data/layoutlib.jar"
}
dependencies {
provided files(getLayoutLibPath())
}
-
Error:All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com
解决方法:defaultConfig 里面添加 flavorDimensions “versionCode” 就能解决不同的productFlavors 切换问题 -
Android webView 不支持 window.location.ref
-
Uncaught TypeError: Cannot call method ‘getItem’ of null at 因为 没有开启:
settings.setDomStorageEnabled(true)
; 这个属性 -
Manifest merger failed with multiple errors, see logs 这个错误 尤其令人恼火。 光说 看日志, 我TM的往哪看去,倒是说清楚呀
解决方法 是执行 这个命令: gradlew processDebugManifest --stacktrace
一般就能看到错误信息。 找到主要的 就能解决,比如说 我的
Attribute application@allowBackup value=(false) from AndroidManifest.xml:80:9-36
is also present at [org.litepal.android:core:1.5.1] AndroidManifest.xml:12:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:78:5-596:19 to override.
这个是因为一些属性和第三方发依赖的冲突了,按照提示’tools:replace=“android:allowBackup” 加上这个即可解决