当前位置: 首页 > news >正文

海北网站建设社区团购系统开发

海北网站建设,社区团购系统开发,开发一个电商app需要多少钱,网络营销是一种什么营销项目场景: 一般来讲应用包名都是配置在 AndroidManifest.xml 中的,但遇到特殊情况,需要修改源码中应用包名 通常都会先去改 AndroidManifest.xml package 但改为后编译发现一顿错误,原因是 java 类中已经指定了 R 文件包名&…

项目场景:

一般来讲应用包名都是配置在 AndroidManifest.xml 中的,但遇到特殊情况,需要修改源码中应用包名

通常都会先去改 AndroidManifest.xml package 但改为后编译发现一顿错误,原因是 java 类中已经指定了 R 文件包名,

几百个都去替换那岂不是一堆文件需要 add,所以想找找有没有快捷方法,还真被我找到了。

解决方案:

通过配置 LOCAL_AAPT_FLAGS := rename-manifest-package "com.android.camera" 就可以

毕竟在 AS 中通过 gradle 配置 applicationId 就可以修改包名,想来 mk 中也是有的,不常用而已。

一开始发现 mk 中可以修改应用的版本号,那么猜测是不是也可以修改包名。

LOCAL_AAPT_FLAGS := --version-name "$(version_name_package)"
LOCAL_AAPT_FLAGS := --version-code "$(version_code_package)"

通过以上配置可以修改应用版本号,我就顺手配了个 LOCAL_AAPT_FLAGS := --package “com.android.camera”

编译小试一下,报错提示如下

aapt2 link [options] -o arg --manifest arg files…
Options:
-o arg Output path.
–manifest arg Path to the Android manifest to build.
-I arg Adds an Android APK to link against.
-A arg An assets directory to include in the APK. These are unprocessed.
-R arg Compilation unit to link, using overlay semantics.
The last conflicting resource given takes precedence.
–package-id arg Specify the package ID to use for this app. Must be greater or equal to
0x7f and can’t be used with --static-lib or --shared-lib.
–java arg Directory in which to generate R.java.
–proguard arg Output file for generated Proguard rules.
–proguard-main-dex arg Output file for generated Proguard rules for the main dex.
–proguard-conditional-keep-rules Generate conditional Proguard keep rules.
–proguard-minimal-keep-rules Generate a minimal set of Proguard keep rules.
–no-auto-version Disables automatic style and layout SDK versioning.
–no-version-vectors Disables automatic versioning of vector drawables. Use this only
when building with vector drawable support library.
–no-version-transitions Disables automatic versioning of transition resources. Use this only
when building with transition support library.
–no-resource-deduping Disables automatic deduping of resources with
identical values across compatible configurations.
–no-resource-removal Disables automatic removal of resources without
defaults. Use this only when building runtime resource overlay packages.
–enable-sparse-encoding This decreases APK size at the cost of resource retrieval performance.
-x Legacy flag that specifies to use the package identifier 0x01.
-z Require localization of strings marked ‘suggested’.
-c arg Comma separated list of configurations to include. The default
is all configurations.
–preferred-density arg Selects the closest matching density and strips out all others.
–product arg Comma separated list of product names to keep
–output-to-dir Outputs the APK contents to a directory specified by -o.
–no-xml-namespaces Removes XML namespace prefix and URI information
from AndroidManifest.xml and XML binaries in res/*.
–min-sdk-version arg Default minimum SDK version to use for AndroidManifest.xml.
–target-sdk-version arg Default target SDK version to use for AndroidManifest.xml.
–version-code arg Version code (integer) to inject into the AndroidManifest.xml if none is
present.
–version-code-major arg Version code major (integer) to inject into the AndroidManifest.xml if none is
present.
–version-name arg Version name to inject into the AndroidManifest.xml if none is present.
–revision-code arg Revision code (integer) to inject into the AndroidManifest.xml if none is
present.
–replace-version If --version-code, --version-name, and/or --revision-code are specified, these
values will replace any value already in the manifest. By
default, nothing is changed if the manifest already defines
these attributes.
–compile-sdk-version-code arg Version code (integer) to inject into the AndroidManifest.xml if none is
present.
–compile-sdk-version-name arg Version name to inject into the AndroidManifest.xml if none is present.
–shared-lib Generates a shared Android runtime library.
–static-lib Generate a static Android library.
–proto-format Generates compiled resources in Protobuf format.
Suitable as input to the bundle tool for generating an App Bundle.
–no-static-lib-packages Merge all library resources under the app’s package.
–non-final-ids Generates R.java without the final modifier. This is implied when
–static-lib is specified.
–no-proguard-location-reference Keep proguard rules files from having a reference to the source file
–stable-ids arg File containing a list of name to ID mapping.
–emit-ids arg Emit a file at the given path with a list of name to ID mappings,
suitable for use with --stable-ids.
–private-symbols arg Package name to use when generating R.java for private symbols.
If not specified, public and private symbols will use the application’s
package name.
–custom-package arg Custom Java package under which to generate R.java.
–extra-packages arg Generate the same R.java but with different package names.
–add-javadoc-annotation arg Adds a JavaDoc annotation to all generated Java classes.
–output-text-symbols arg Generates a text file containing the resource symbols of the R class in
the specified folder.
–allow-reserved-package-id Allows the use of a reserved package ID. This should on be used for
packages with a pre-O min-sdk

–auto-add-overlay Allows the addition of new resources in overlays without
tags.
–override-styles-instead-of-overlaying Causes styles defined in -R resources to replace previous definitions
instead of merging into them

–rename-manifest-package arg Renames the package in AndroidManifest.xml.
–rename-resources-package arg Renames the package in resources table
–rename-instrumentation-target-package arg Changes the name of the target package for instrumentation. Most useful
when used in conjunction with --rename-manifest-package.
–rename-overlay-target-package arg Changes the name of the target package for overlay. Most useful
when used in conjunction with --rename-manifest-package.
-0 arg File suffix not to compress.
–no-compress Do not compress any resources.
–keep-raw-values Preserve raw attribute values in xml files.
–no-compress-regex arg Do not compress extensions matching the regular expression. Remember to
use the ‘$’ symbol for end of line. Uses a case-sensitive ECMAScriptregular expression grammar.
–warn-manifest-validation Treat manifest validation errors as warnings.
–split arg Split resources matching a set of configs out to a Split APK.
Syntax: path/to/output.apk:[,[…]].
On Windows, use a semicolon ‘;’ separator instead.
–exclude-configs arg Excludes values of resources whose configs contain the specified qualifiers.
–debug-mode Inserts android:debuggable=“true” in to the application node of the
manifest, making the application debuggable even on production devices.
–strict-visibility Do not allow overlays with different visibility levels.
–exclude-sources Do not serialize source file information when generating resources in
Protobuf format.
–trace-folder arg Generate systrace json trace fragment to specified folder.
–merge-only Only merge the resources, without verifying resource references. This flag
should only be used together with the --static-lib flag.
-v Enables verbose logging.
-h Displays this help menu

可以看到完整的使用提示 ,在其中就可以找到 --rename-manifest-package arg Renames the package in AndroidManifest.xml.

参考文章

Android应用编译时自动生成版本号

http://www.yayakq.cn/news/422845/

相关文章:

  • 网站集群建设相关的招标做毕业设计资料网站好
  • 科凡建站杭州如何设计网站首页
  • 一鸣东莞网站建设公司建网站用什么服务器好
  • 做网站什么主题比较好网站404页面编写
  • 怎样创建网站教程企业网站建设与推广方案实例
  • 重庆网站设计软件网站无法上传图片
  • 网络营销推广方案案例分析长沙关键词优化
  • 网站建设预期效果营销型网站建设价格贵吗
  • 开网站做备案需要什么资料惠州做网站建设价格
  • 做网站联系电话wordpress输入网址采集单个网页
  • 昆明 网站设计做苗木的用什么网站
  • 网站 廉政建设 板块网站规划书的内容有哪些
  • 专业团队高端网站制作免费咨询在线律师
  • 网网站制作开发建筑论坛网站
  • 如何填写网站建设计划表郑州网站开发公司名称大全
  • 怎样在国外网站上做外贸广告互联网登录的网站名
  • 周口网站推广中英文网站开发费用
  • 有一个网站怎么做cpc网站报备之后如何建设网站
  • 网站设计的收费wordpress显示文件
  • 模拟建设网站班级网站 模板
  • 网站空间免费试用html网页制作代码作业
  • 园林工建设有限公司网站江门市住房和城乡建设局门户网站
  • 网站建设人文环境中太建设集团网站
  • 网站该怎么找到平湖网站建设流程
  • 外包网站开发汕头娱乐场所最新消息
  • 制作网站服务器黄骅贴吧最新消息金鼎18号
  • 网站建设公司电话销售话术资讯文章减肥健康wordpress
  • 中山网站建设seo优化营销制作设计东莞营销型网站建设公司
  • 备案网站简介怎么写工作一般做网站视频的工作叫做什么
  • 静态手机网站建设的基本特点安新seo优化排名网站