To run dex in process, the Gradle daemon needs a larger heap. It currently has 1024 MB. For faster builds, increase the maximum heap size for the Gradle daemon to at least 1536 MB. To do this set org.
如图:android1024.png解决:1:app下build.gradle修改defaultConfig{minSdkVersion19targetSdkVersion26versionCode1versionName