Instant Apps - Error: org.gradle.process.internal.ExecException: Processing command completed with nonzero exit value 1

I'm trying to create my first instant application that was introduced in Google IO 2017. I downloaded the Google Instant Apps SDK and set it minSDKVersionto 23

I created the first project, and I encountered errors when trying to create it. Does anyone who also faces the same bugs for creating instant applications? Is this due to some error during the assembly process from 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
+2
source share
3 answers

To create your instant applications, you must use build-tools \ 26.0.0-rc1 and higher. It looks like you are using 25.0.2.

+7

Android Instant Apps

, :

  • Linux, macOS Windows.
  • JDK 1.8
  • Android Studio 3.0 - , ANDROID_HOME, Android SDK .

    Android Studio Android SDK Manager :

  • Android SDK 6.0

  • Android SDK Build Tools 26.x
  • Android SDK Tools 25.x
  • Android SDK 25.x
  • Android Support Library ( ) Android- ( )

0

3.1 Canary2 , Instant Installed. , adb . Canary6, Gradle. 06. , : "qemu-system-i386.exe ". V6.2.1 Intel x86 Emulator Accelerator. ?

I worked with the Topeka sample code and thought there might be some inconsistency with all version updates. So I returned a copy of my project. But now that the installation of the application has completed with "Failed to access the package manager ... delete it?"

A few more attempts and found that the (only) activity is not available. As soon as I changed the name of the directory in the path that remained after creating this test copy of the project, Gradle, the APK is loaded, and everything is correct.

Phew! Hope this helps others.

0
source

Source: https://habr.com/ru/post/1677616/


All Articles