Android Studio ignore --core-library flag

前端 未结 6 1002
盖世英雄少女心
盖世英雄少女心 2020-12-06 17:40

I have a project, which i want to configure on my computer.

On anothe computer it works, but with old version of Android Studio 0.4.0 whenever I use 0.5.2

Th

6条回答
  •  醉酒成梦
    2020-12-06 17:55

    project.tasks.withType(com.android.build.gradle.tasks.Dex) {
        additionalParameters=['--core-library']
    }
    

    does not work proper,and get the error:

    Could not get unknown property 'com' for object of type com.android.build.gradle.AppExtension.

    I solve the problem by adding this to android block.

    dexOptions {
        preDexLibraries = false
        additionalParameters=['--core-library']
    }
    

    Hoping this is helpful to you!

提交回复
热议问题