Instant Apps-错误:org.gradle.process.internal.ExecException:进程“命令"以非零退出值1完成 [英] Instant Apps - Error:org.gradle.process.internal.ExecException: Process 'command' finished with non-zero exit value 1
问题描述
我正在尝试构建Google IO 2017中引入的第一个即时应用程序.我已经下载了Google Instant Apps SDK,并将 minSDKVersion
的目标版本设置为23
I am trying to build my first instant app which was introduced in Google IO 2017. I have downloaded Google Instant Apps SDK and target minSDKVersion
to 23
我创建了第一个项目,并且在尝试构建它时遇到以下错误.是否有人在构建Instant应用程序时也遇到相同的错误?这是因为它们的构建过程中存在一些错误吗?
I created a first project and I am facing below errors while trying to build it. Is there anyone who is also facing same errors for building Instant apps ? Is this because of some bug in build process of them ?
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :base:generateDebugSources, :base:generateDebugAndroidTestSources, :base:mockableAndroidJar, :feature:generateDebugSources, :feature:mockableAndroidJar, :feature:generateDebugAndroidTestSources, :instantapp:generateDebugSources]
Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\williams\AppData\Local\Android\Sdk\build-tools\25.0.2\aapt2.exe with arguments {link -I C:\Users\williams\AppData\Local\Android\Sdk\platforms\android-25\android.jar --manifest C:\Users\williams\AndroidStudioProjects\InstantAppDemo\base\build\intermediates\manifest\androidTest\debug\AndroidManifest.xml -R @C:\Users\williams\AndroidStudioProjects\InstantAppDemo\base\build\intermediates\incremental\processDebugAndroidTestResources\aapt-temp\aapt-resources-list.txt --auto-add-overlay --java C:\Users\williams\AndroidStudioProjects\InstantAppDemo\base\build\generated\source\r\androidTest\debug -o C:\Users\williams\AndroidStudioProjects\InstantAppDemo\base\build\intermediates\res\androidTest\debug\resources-debugAndroidTest.ap_ -0 apk --output-text-symbols C:\Users\williams\AndroidStudioProjects\InstantAppDemo\base\build\intermediates\symbols\androidTest\debug\R.txt --no-version-vectors}
Error:com.android.ide.common.process.ProcessException: Error while executing process C:\Users\williams\AppData\Local\Android\Sdk\build-tools\25.0.2\aapt2.exe with arguments {link -I C:\Users\williams\AppData\Local\Android\Sdk\platforms\android-25\android.jar --manifest C:\Users\williams\AndroidStudioProjects\InstantAppDemo\base\build\intermediates\manifest\androidTest\debug\AndroidManifest.xml -R @C:\Users\williams\AndroidStudioProjects\InstantAppDemo\base\build\intermediates\incremental\processDebugAndroidTestResources\aapt-temp\aapt-resources-list.txt --auto-add-overlay --java C:\Users\williams\AndroidStudioProjects\InstantAppDemo\base\build\generated\source\r\androidTest\debug -o C:\Users\williams\AndroidStudioProjects\InstantAppDemo\base\build\intermediates\res\androidTest\debug\resources-debugAndroidTest.ap_ -0 apk --output-text-symbols C:\Users\williams\AndroidStudioProjects\InstantAppDemo\base\build\intermediates\symbols\androidTest\debug\R.txt --no-version-vectors}
Error:org.gradle.process.internal.ExecException: Process 'command 'C:\Users\williams\AppData\Local\Android\Sdk\build-tools\25.0.2\aapt2.exe'' finished with non-zero exit value 1
Error:Execution failed for task ':base:processDebugAndroidTestResources'.
> Failed to execute aapt
Information:BUILD FAILED in 3s
Information:4 errors
Information:0 warnings
Information:See complete output in console
推荐答案
要构建即时应用程序,应使用build-tools \ 26.0.0-rc1及更高版本.看来您使用的是25.0.2.
To build your instant apps, you should use build-tools\26.0.0-rc1 and above. It looks like you are using 25.0.2.
这篇关于Instant Apps-错误:org.gradle.process.internal.ExecException:进程“命令"以非零退出值1完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!