赞
踩
1,Error Loading Project: Cannot load module walk
解决:close project , import project
2,unregistered vcs root detected the directory
解决:add root
3,Error running: Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled.
解决:
4,Execution failed for task ':compileDebugAidl'. java.lang.IllegalStateException: aidl is missing
统一所有的module的build tools版本与compile idk版本
5, Error:(36, 0) Gradle DSL method not found: 'testCompile()'
直接注释掉,不影响
6, Error:A problem was found with the configuration of task ':app:packageDebug'.
> File '/Users/hujason/AndroidStudioProjects/MyApplication/app/build/intermediates/res/resources-debug-stripped.ap_' specified for property 'resourceFile' does not exist.
把下面代码注释掉即可
shrinkResources true
buildTypes { release { minifyEnabled true // shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { minifyEnabled true // shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }
7, Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForDebug'.
> java.io.IOException: Please correct the above warnings first.
Information:Gradle tasks [:app:assembleDebug]
Warning:rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.ConcurrentCircularArrayQueue: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.ConcurrentSequencedCircularArrayQueue: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.MpmcArrayQueueConsumerField: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.MpmcArrayQueueProducerField: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.MpscLinkedQueue: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.SpmcArrayQueueConsumerField: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.SpmcArrayQueueProducerField: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.SpscArrayQueue: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.SpscUnboundedArrayQueue: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.UnsafeAccess: can't find referenced class sun.misc.Unsafe
Warning:there were 44 unresolved references to classes or interfaces.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForDebug'.
> java.io.IOException: Please correct the above warnings first.
Information:BUILD FAILED
Information:Total time: 3.77 secs
Information:1 error
Information:14 warnings
Information:See complete output in console
在proguard-rules.pro中添加
-dontwarn rx.internal.util.unsafe.*
8、Error:Unable to load class 'org.gradle.logging.StyledTextOutput$Style'.
导入开源中国安卓客户端
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.3.0' } }
升级 dexcount-gradle-plugin 版本到最新 0.7.2
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。