Android Studio 问题记(一)

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值