3上创建项目时出错

3上创建项目时出错

本文介绍了在Android Studio 2.3上创建项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将Android Studio从2.2升级到2.3,并且在创建具有导航活动的新Android项目时遇到两个错误:

I have upgraded Android Studio from 2.2 to 2.3 and when I create a new Android project with a navigation activity I got two errors:

Error:java.util.concurrent.ExecutionException:
java.lang.RuntimeException: AAPT process not ready to receive commands

Error:Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException:
java.lang.RuntimeException: AAPT process not ready to receive commands

当我使用旧版本时,我解决了将build.gradle文件中的buildToolsVersion值更改为23.0.3而不是25.0.0的问题.

When I had the older version I solved the problem changing the value of buildToolsVersion in build.gradle file to 23.0.3 instead of 25.0.0.

在新版本中,我进行了相同的更改,但出现以下错误:

In the new version I make the same change and I got the following error:

Gradle Sync Issues
Error:Error:The SDK Build Tools revision (23.0.3) is too low for project
':app'. Minimum required is 25.0.0
Update Build Tools version and sync project

但这不是我所做的一项更改.我还必须在依赖项上更改android支持库的版本:

But this is not the one change I make. I also must change the version of android support libraries on the dependencies:

compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'

这些错误出现在Debian Linux上.我有一个在Windows上工作的同事,他可以使用Android Studio 2.3版本创建新项目.

These errors appear on Debian Linux. I have a colleague that works on Windows and he can create new projects using Android Studio 2.3 version.

如何解决这些错误?

谢谢.

推荐答案

转到File->Project Structure...(或按Ctrl+Shift+Alt+S).

在左侧边栏中,单击Project(在SDK Location下),然后将Gradle version(更改为3.2)和Android Plugin Version(更改为2.2.02.2.2).

In the left sidebar, click Project (under SDK Location), and change Gradle version (to something like 3.2) and change Android Plugin Version (to something like 2.2.0 or 2.2.2).

这会将您的AndroidStudio回滚到2.3升级之前,以便您可以继续开发,直到Google解决2.3的任何问题.然后,您也可以将buildToolsVersion更改为23.0.3以避免获取

This will rollback your AndroidStudio to before the 2.3 upgrade so you can continue to develop until Google gets around to fixing whatever's wrong with 2.3. Then you can also change your buildToolsVersion to 23.0.3 to avoid getting the

Error:Error:The SDK Build Tools revision (23.0.3) is too low for project ':app'

错误,您的项目应该再次正确编译.

error, and your project should compile properly again.

这篇关于在Android Studio 2.3上创建项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 11:54