【问题标题】:New AndroidStudio 2.3 Error新的 Android Studio 2.3 错误
【发布时间】:2017-03-19 15:21:03
【问题描述】:

我刚刚安装了新的 Android Studio 并尝试创建一个新项目。但我得到了这个奇怪的错误。我使用的是 32 位 Linux 系统。

错误:任务 ':app:mergeDebugResources' 执行失败。

错误:java.util.concurrent.ExecutionException:java.lang.RuntimeException:AAPT 进程未准备好接收命令 信息:构建失败

错误:java.util.concurrent.ExecutionException:java.lang.RuntimeException:AAPT 进程未准备好接收命令

信息:总时间:14.838 秒

信息:2 个错误

信息:0 个警告 信息:在控制台中查看完整的输出

我不明白为什么会收到此错误。

分级

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
    applicationId "com.example.sandesh.testing"
    minSdkVersion 15
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
 }
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}

Gradle(项目)

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.3.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

【问题讨论】:

  • 请提供gradle文件
  • @JaydeepPatel,添加请检查
  • 主项目gradle文件或版本?
  • 升级到 2.3.0 就可以了。比如:类路径'com.android.tools.build:gradle:2.3.0'
  • @JaydeepPatel,已经是classpath 'com.android.tools.build:gradle:2.3.0'

标签: java android android-studio


【解决方案1】:

你的问题是最新的 Android Studio 不能在 32 位系统上运行。在下载页面上,您还可以查看要求:

能够运行 32 位应用程序的 64 位分发版

最新版本不支持 32 位。我认为您应该尝试一种解决方案,但我不知道它会工作多长时间:

Step1.Go to terminal
Step2.type gedit .profile
Step3.paste the below line at end of the page
Step4.export ANDROID_EMULATOR_FORCE_32BIT=true
Step5.type source .profile in terminal or restart system

请记住,将来 Android Stdio 可能也会停止支持此功能,因此您最好迁移到 bit64 或降级您的 android studio 版本。

【讨论】:

    猜你喜欢
    • 2017-07-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-28
    • 2017-07-28
    • 1970-01-01
    • 2017-08-10
    • 2017-07-29
    相关资源
    最近更新 更多