精华内容
下载资源
问答
  • aapt文件可在我的工具里找到 1、找到文件aapt.exe文件的地址所在 ...2、将文件路径加入到环境变量中(最好是加入到系统变量的path中) 3、打开cmd,直接输入aapt命令,如果有较多的返回信息,那么就成功了 ...

    aapt文件可在我的工具里找到

    1、找到文件aapt.exe文件的地址所在

    在这里插入图片描述

    2、将文件路径加入到环境变量中(最好是加入到系统变量的path中)

    在这里插入图片描述

    3、打开cmd,直接输入aapt命令,如果有较多的返回信息,那么就成功了

    此图是别人的,我本机电脑没法截图

    展开全文
  • aapt环境变量配置

    千次阅读 2019-06-12 13:20:00
    D:\android-sdk_r24.4.1-windows\android-sdk-windows\build-tools\28.0.2 将aapt路径添加到path中, 打开cmd 输入aapt 转载于:https://www.cnblogs.com/tzxy/p/11009027.html

    D:\android-sdk_r24.4.1-windows\android-sdk-windows\build-tools\28.0.2

    将aapt路径添加到path中,

    打开cmd

    输入aapt

     

    转载于:https://www.cnblogs.com/tzxy/p/11009027.html

    展开全文
  • Mac配置AAPT环境变量

    千次阅读 2017-09-11 09:38:44
    前几天用到了AAPT工具,想要查看一个Android包的信息,奈何输入aapt命令后,提示我以下内容: ...此时需要配置AAPT环境变量: ①打开Terminal,在根目录下输入touch命令: DavidtekiMacBook-Air:~ du$ touch

    前几天用到了AAPT工具,想要查看一个Android包的信息,奈何输入aapt命令后,提示我以下内容:

    DavidtekiMacBook-Air:~ du$ aapt
    -bash: aapt: command not found


    此时需要配置AAPT的环境变量:

    ①打开Terminal,在根目录下输入touch命令:

    DavidtekiMacBook-Air:~ du$ touch .bash_profile
    这里解释一下touch命令,touch命令有两个功能:

    一是用于把已存在文件的时间标签更新为系统当前的时间(默认方式),它们的数据将原封不动地保留下来;

    二是用来创建新的空文件。

    在根目录下输入ls -a命令,查看是否有.bash_profile文件,若已存在,则可以省略第①步。

    ②使用open命令打开.bash_profile文件,并进行编辑,在文件末尾追加以下代码行

    AAPT_HOME=/Users/du/Library/Android/sdk/build-tools/25.0.0
    export AAPT_HOME
    export PATH=$PATH:$AAPT_HOME
    注意,AAPT_HOME可以是你的sdk的build-tools的任意版本的路径

    ③重新开启一个Terminal,此时再输入aapt v命令,可以看到aapt的版本信息,此时aapt的环境变量配置成功

    DavidtekiMacBook-Air:~ du$ aapt v
    Android Asset Packaging Tool, v0.2-3359293


    最后,可以使用aapt dump badging <apk path>来查看apk的信息:

    DavidtekiMacBook-Air:~ du$ aapt dump badging /Users/du/AndroidProjectForGerrit/EverydayStudy/app/build/outputs/apk/app-huawei-dhl.apk 
    package: name='com.katherine.du.everydaystudy.dhl' versionCode='1' versionName='1.0' platformBuildVersionName='7.1.1'
    sdkVersion:'21'
    targetSdkVersion:'25'
    uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
    uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
    uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
    uses-permission: name='android.permission.ACCESS_WIFI_STATE'
    uses-permission: name='android.permission.INTERNET'
    ......

    附:AAPT使用方法:

    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.
       badging          Print the label and icon for the app declared in APK.
       permissions      Print the permissions from the APK.
       resources        Print the resource table from the APK.
       configurations   Print the configurations in the APK.
       xmltree          Print the compiled xmls in the given assets.
       xmlstrings       Print the strings of the given compiled xml assets.
    
     aapt p[ackage] [-d][-f][-m][-u][-v][-x][-z][-M AndroidManifest.xml] \
            [-0 extension [-0 extension ...]] [-g tolerance] [-j jarfile] \
            [--debug-mode] [--min-sdk-version VAL] [--target-sdk-version VAL] \
            [--app-version VAL] [--app-version-name TEXT] [--custom-package VAL] \
            [--rename-manifest-package PACKAGE] \
            [--rename-instrumentation-target-package PACKAGE] \
            [--utf16] [--auto-add-overlay] \
            [--max-res-version VAL] \
            [-I base-package [-I base-package ...]] \
            [-A asset-source-dir]  [-G class-list-file] [-P public-definitions-file] \
            [-D main-dex-class-list-file] \
            [-S resource-sources [-S resource-sources ...]] \
            [-F apk-file] [-J R-file-dir] \
            [--product product1,product2,...] \
            [-c CONFIGS] [--preferred-density DENSITY] \
            [--split CONFIGS [--split CONFIGS]] \
            [--feature-of package [--feature-after package]] \
            [raw-files-dir [raw-files-dir] ...] \
            [--output-text-symbols DIR]
    
       Package the android resources.  It will read assets and resources that are
       supplied with the -M -A -S or raw-files-dir arguments.  The -J -P -F and -R
       options control which files are output.
    
     aapt r[emove] [-v] file.{zip,jar,apk} file1 [file2 ...]
       Delete specified files from Zip-compatible archive.
    
     aapt a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]
       Add specified files to Zip-compatible archive.
    
     aapt c[runch] [-v] -S resource-sources ... -C output-folder ...
       Do PNG preprocessing on one or several resource folders
       and store the results in the output folder.
    
     aapt s[ingleCrunch] [-v] -i input-file -o outputfile
       Do PNG preprocessing on a single file.
    
     aapt v[ersion]
       Print program version.
    
     Modifiers:
       -a  print Android-specific data (resources, manifest) when listing
       -c  specify which configurations to include.  The default is all
           configurations.  The value of the parameter should be a comma
           separated list of configuration values.  Locales should be specified
           as either a language or language-region pair.  Some examples:
                en
                port,en
                port,land,en_US
       -d  one or more device assets to include, separated by commas
       -f  force overwrite of existing files
       -g  specify a pixel tolerance to force images to grayscale, default 0
       -j  specify a jar or zip file containing classes to include
       -k  junk path of file(s) added
       -m  make package directories under location specified by -J
       -u  update existing packages (add new, replace older, remove deleted files)
       -v  verbose output
       -x  create extending (non-application) resource IDs
       -z  require localization of resource attributes marked with
           localization="suggested"
       -A  additional directory in which to find raw asset files
       -G  A file to output proguard options into.
       -D  A file to output proguard options for the main dex into.
       -F  specify the apk file to output
       -I  add an existing package to base include set
       -J  specify where to output R.java resource constant definitions
       -M  specify full path to AndroidManifest.xml to include in zip
       -P  specify where to output public resource definitions
       -S  directory in which to find resources.  Multiple directories will be scanned
           and the first match found (left to right) will take precedence.
       -0  specifies an additional extension for which such files will not
           be stored compressed in the .apk.  An empty string means to not
           compress any files at all.
       --debug-mode
           inserts android:debuggable="true" in to the application node of the
           manifest, making the application debuggable even on production devices.
       --include-meta-data
           when used with "dump badging" also includes meta-data tags.
       --pseudo-localize
           generate resources for pseudo-locales (en-XA and ar-XB).
       --min-sdk-version
           inserts android:minSdkVersion in to manifest.  If the version is 7 or
           higher, the default encoding for resources will be in UTF-8.
       --target-sdk-version
           inserts android:targetSdkVersion in to manifest.
       --max-res-version
           ignores versioned resource directories above the given value.
       --values
           when used with "dump resources" also includes resource values.
       --version-code
           inserts android:versionCode in to manifest.
       --version-name
           inserts android:versionName in to manifest.
       --replace-version
           If --version-code and/or --version-name are specified, these
           values will replace any value already in the manifest. By
           default, nothing is changed if the manifest already defines
           these attributes.
       --custom-package
           generates R.java into a different package.
       --extra-packages
           generate R.java for libraries. Separate libraries with ':'.
       --generate-dependencies
           generate dependency files in the same directories for R.java and resource package
       --auto-add-overlay
           Automatically add resources that are only in overlays.
       --preferred-density
           Specifies a preference for a particular density. Resources that do not
           match this density and have variants that are a closer match are removed.
       --split
           Builds a separate split APK for the configurations listed. This can
           be loaded alongside the base APK at runtime.
       --feature-of
           Builds a split APK that is a feature of the apk specified here. Resources
           in the base APK can be referenced from the the feature APK.
       --feature-after
           An app can have multiple Feature Split APKs which must be totally ordered.
           If --feature-of is specified, this flag specifies which Feature Split APK
           comes before this one. The first Feature Split APK should not define
           anything here.
       --rename-manifest-package
           Rewrite the manifest so that its package name is the package name
           given here.  Relative class names (for example .Foo) will be
           changed to absolute names with the old package so that the code
           does not need to change.
       --rename-instrumentation-target-package
           Rewrite the manifest so that all of its instrumentation
           components target the given package.  Useful when used in
           conjunction with --rename-manifest-package to fix tests against
           a package that has been renamed.
       --product
           Specifies which variant to choose for strings that have
           product variants
       --utf16
           changes default encoding for resources to UTF-16.  Only useful when API
           level is set to 7 or higher where the default encoding is UTF-8.
       --non-constant-id
           Make the resources ID non constant. This is required to make an R java class
           that does not contain the final value but is used to make reusable compiled
           libraries that need to access resources.
       --shared-lib
           Make a shared library resource package that can be loaded by an application
           at runtime to access the libraries resources. Implies --non-constant-id.
       --app-as-shared-lib
           Make an app resource package that also can be loaded as shared library at runtime.
           Implies --non-constant-id.
       --error-on-failed-insert
           Forces aapt to return an error if it fails to insert values into the manifest
           with --debug-mode, --min-sdk-version, --target-sdk-version --version-code
           and --version-name.
           Insertion typically fails if the manifest already defines the attribute.
       --error-on-missing-config-entry
           Forces aapt to return an error if it fails to find an entry for a configuration.
       --output-text-symbols
           Generates a text file containing the resource symbols of the R class in the
           specified folder.
       --ignore-assets
           Assets to be ignored. Default pattern is:
           !.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~
       --skip-symbols-without-default-localization
           Prevents symbols from being generated for strings that do not have a default
           localization
       --no-version-vectors
           Do not automatically generate versioned copies of vector XML resources.
       --private-symbols
           Java package name to use when generating R.java for private resources.
    




    展开全文
  • win10 Android AAPT环境配置

    千次阅读 2020-01-13 11:41:26
    1,找到文件D:\Program Files (x86)\APP\...2,右击“此电脑”–属性,单击“高级系统设置” ,高级–环境变量 path变量的值为我们所找到的文件地址,如图。 3windows+r,输入cmd. 4输入aapt 命令,如图,成功。 ...

    1,找到文件D:\Program Files (x86)\APP\android-sdk_r24.4.1-windows\android-sdk-windows\build-tools\28.0.2
    在这里插入图片描述
    2,右击“此电脑”–属性,单击“高级系统设置” ,高级–环境变量 path变量的值为我们所找到的文件地址,如图。
    在这里插入图片描述
    3windows+r,输入cmd.
    4输入aapt 命令,如图,成功。
    在这里插入图片描述
    aapt list -v -a myfile.apk,这个命令将会打印和apk相关的所有详细信息

    展开全文
  • Mac 配置AAPT环境变量

    千次阅读 2017-07-20 17:06:24
    在终端的根目录下依次输入如下命令  touch .bash_profile ...然后在打开的 .bash_profile文件中输入如下三行...AAPT_HOME=/Users/sweet_xue/Library/Android/sdk/build-tools/25.0.3 export AAPT_HOME export
  • Mac环境下adb的配置 1.打开terminal终端 2.进入根目录 指令:cd ~ 3.查看是否有 bash_profile文件。 指令:ls -a 4.若存在则进入第5步,若不存在,创建bash_profile。 指令:touch .bash_profile 5.打开.bash_...
  • AAPT_HOME=/Users/xiaoyulong/Library/Android/sdk/build-tools/27.0.1 export AAPT_HOME export PATH=$PATH:$AAPT_HOME 检查应用ICON是否为PNG格式,可以使用aapt工具,执行下面的...
  • 在当前用户目录下新建.bash_profile文件,执行以下命令: vi .bash_profile 然后保存,输入命令 :wq 最后使命令生效,执行命令 source .bash_profile 转载于:...
  • Linux环境下,cts工具配置相关,aapt包,将aapt放在和adb同级目录即可,亲测可用。 欢迎下载交流cts使用心得。
  • Android工具-aapt

    2020-07-16 15:07:06
    aaptaapt环境变量配置AAPT命令详解Android AAPT详解 aapt环境变量配置 AAPT命令详解 配置好环境变量后,在终端中输入 aapt v 会得到aapt版本信息,如下: Android AAPT详解 入口
  • AAPT

    2019-09-19 01:27:42
    aapt即Android Asset Packaging Tool , 在SDK的build-tools目录下. 该工具可以查看, 创建, 更新ZIP格式的文档附件(zip, jar, apk). 也可将资源文件编译成二进制文件.尽管你可能没有直接使用过aapt工具, 但是build ...
  • 41.Android aapt工具

    千次阅读 2015-11-28 15:52:33
    41.Android aapt工具...aapt 环境配置 aapt list aapt dump aapt package 其他命令aapt 介绍可参考官方文档: http://www.androidcn.net/wiki/index.php/Reference/aapt aapt stands for Android Asset Packaging
  • aapt 为 Android Asset Packaging Tool , 在SDK的build-tools/目录下. 该工具可以查看, 创建, 更新ZIP格式的文档附件(zip, jar, apk). 也可将资源文件编译成二进制文件。 配置 linux 只需在 .bashrc 最后面...
  • Mac环境下配置aapt

    千次阅读 2019-05-06 13:55:30
    2.打开终端进入/Users/yqhuang/Library/Android/sdk 查找aapt的路径 cd /Users/yqhuang/Library/Android/sdk ls -a cd build-tools cd 28.0.3 ls pwd #获取aapt路径 3.新建终端窗口,在根目录下新建.bash...
  • 如何脱离Android源码环境编译aapt

    千次阅读 2016-06-08 14:15:23
    由于要修改aapt源码,所以clone了一份android源码,无奈mac的ssd只有256G,所以把源码下到了虚拟机里,这个虚拟机在移动硬盘中,系统是ubuntu的,编译linux和windows版...于是,我需要将aapt的最小依赖环境提取出来。标
  • aapt windows

    2014-05-11 15:03:09
    aapt windows版本
  • aapt 命令

    2014-01-04 23:59:15
    该工具在SDK/tools目录下,如果你没有设置环境变量,那需要进入该目录下才能运行aapt命令,如果设置了环境变量则可以在任何目录下运行aapt命令了。 1、列出压缩文件目录 aapt l[ist] [-v] [-a] file.{zip,jar,...
  • ubuntu环境开发android时候无法找到aapt

    千次阅读 2015-08-16 05:06:17
    环境:ubuntu kylin 14.04系统 android使用adt-linux64位 出现错误的内容:  /usr/adt-bundle-linux-x86_64-20140321/sdk/build-tools/android-4.4.2/aapt: error while loading shared libraries: libstdc++.so.6:...
  • aapt命令详解

    万次阅读 2019-04-02 10:47:06
    aapt一般在android sdk的build-tools中对应文件夹里面,将其路径添加到环境变量中,即可在命令行中直接使用aapt命令; aapt参数详解 aapt 命令后可直接查看参数详解 aapt l[ist] [-v] [-a] file.{zip,jar,apk} ...
  • 通过纯JAVA解析apk文件,可解决versionName中包含@7F开头的信息
  • aapt打包

    千次阅读 2016-12-01 22:37:09
    · aapt: androidapplication package tool,SDK Android打包流程 1. 通过aapt工具将资源文件(res)、清单文件(AndroidManifest.xml)生成对应的R.java文件 o 在项目的根目录下新建 gen目录,并且...
  • aapt是android自动打包工具之一。aapt一般在android sdk的build-tools中对应文件夹里面,将其路径添加到环境变量中,即可在命令行中直接使用aapt命令;
  • 前提:已经安装并配置好了Android SDK tools首先,配置aapt环境路径:终端中输入:open .bash_profile打开此文件后输入:export PATH=${PATH}:~/Library/Android/sdk/build-tools/25.0.3输入完成后保存,然后回到...
  • aapt反编译

    2019-06-28 16:32:45
    aapt反编译说起来简单,其实就是一行命令,但是在执行命令的前提下,我们需要把环境给配置了,aapt不用去下载(如果你的电脑中有android-sdk的话) android-sdk中有aapt.exe文件,我们需要将它的路径配置到环境变量...
  • 目录前言AAPT概述资源CompileLink查看编译后的资源资源共享ids.xml概述public.xml概述资源id固定`...aaptaapt2 的差异(运行环境和运行结果); 资源 id 的固定; 进行 PUBLIC 的标记; aapt 运行环境为 gradl.
  • aapt下载地址

    2020-05-08 21:16:10
    下载下来后,需要配置aapt地址在环境变量内,即可使用aapt去运行 举例:在mac下载后切换到aapt路径下,使用当前路径 ./aapt即可执行 使用echo $PATH 查看已配置的路径,将aapt放入任意一个路径下,即可使用aapt...
  • 利用"aapt list apk(名字)",命令可以查看apk的信息,如果未安装,则可能会提示使用"sudo apt install aapt"命令进行安装;照提示进行安装发现突发安装aapt的包,这个时候可以使用"sudo apt-get update"命令解决: ...
  • Mac aapt apksigner等aapt command not found

    千次阅读 2019-12-30 18:30:46
    1.是因为没用配置环境变量所致 2.前提:已安装配置Android SDK (1)打开配置文件(终端打开) open .bash_profile (2)配置环境变量 环境变量如下: export AAPT_HOME=/Users/xxxx/Library/Android/sdk/build-...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 7,565
精华内容 3,026
关键字:

aapt环境