Solve the Problem of aapt & quot; finished with non-zero exit value 1 & quot;, aaptnon-zero

Source: Internet
Author: User

Solve the Problem of aapt "finished with non-zero exit value 1", aaptnon-zero
Problem description

After using Android Studio to import Eclipse projects recently, the following errors are often reported:

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Vishnu Ruhela\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe'' finished with non- zero exit value 1

This inexplicable problem really ruined my three views. Fortunately, after constant efforts and attempts, I still solved it.

Solution 1: Modify the reference method of the application launcher icon

Change from drawable to mipmap:
Right-click res-> New-> Android resourse directory-> select mipmap, step 1;
Right-click mipmap-> New-> Image Asset to complete the remaining operations.

2. Modify manifest

1. Change "@ drawable/ic_launcher" of android: icon to "@ mipmap/ic_launcher"
2. Add tools: replace = "android: icon" to the application. See the following code:

<application        android:allowBackup="true"        tools:replace="android:icon"        android:icon="@mipmap/ic_launcher"        android:label="@string/app_name"        android:theme="@style/AppTheme">

If the tools are marked red, add xmlns: tools = "http://schemas.android.com/tools#to the manifest label.

The specific cause of the problem cannot be further analyzed, but this operation not only conforms to the new application specifications, but also solves my thorny problem.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.