Giter VIP home page Giter VIP logo

android-aapt-wrapper's Introduction

Wrapper for Android Asset Packaging Tool (AAPT) to pass --no-version-vectors when packaging.

This is useful for non-Gradle builds that cannot pass this parameter (e.g. Android ADT not maintained anymore), to avoid apps using AppCompat to crash with:

Caused by: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f020052

Android Developers - Vector Drawables Backward Compatibility Solution

Installation

Download already compiled binaries from Releases tab (top)

Windows

  • Navigate to android-sdk\build-tools\xx.y.z\
  • Rename aapt.exe to aapt-original.exe
  • Save aapt-wrapper.exe as aapt.exe

Unix

  • Navigate to android-sdk/build-tools/xx.y.z/
  • Rename aapt to aapt-original
  • Save aapt-wrapper as aapt

Verify installation by calling aapt. You should see the wrapper info followed by the real aapt info.

> aapt
Android Asset Packaging Tool - Wrapper
Version 1.0 (31 Dec 2017)
https://github.com/dandar3/android-aapt-wrapper
 
Command:
  aapt-original
 
Android Asset Packaging Tool
 
Usage:
 aapt l[ist] [-v] [-a] file.{zip,jar,apk}
   List contents of Zip-compatible archive.
 
 aapt d[ump] [--values] [--include-meta-data] WHAT file.{apk} [asset [asset ...]]
   strings          Print the contents of the resource table string pool in the APK.
...

How to compile

Optional step if you need to compile it yourself with MingW for Windows / g++ for Linux.

g++ aapt-wrapper.cpp -o aapt-wrapper

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.