- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想签一个android .apk
,我的 pom.xml
中有以下配置文件设置
<profiles>
<profile><!-- release profile. uses keystore defined in keystore.* properties. signs and zipaligns the app to the target folder-->
<id>release</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<defaultGoal>install</defaultGoal>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>signing</id>
<goals>
<goal>sign</goal>
</goals>
<phase>package</phase>
<inherited>true</inherited>
<configuration>
<includes>
<include>
${project.build.directory}/target/${project.artifactId}-${project.version}.apk
</include>
</includes>
<keystore>my-release-key.keystore</keystore>
<storepass>mypasshere</storepass>
<keypass>mypasshere</keypass>
<alias>mykeystore</alias>
<verbose>true</verbose>
<!--<destDir>gen</destDir>-->
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>maven-android-plugin</artifactId>
<configuration>
<zipalign>
<verbose>true</verbose>
<skip>false</skip>
<!-- defaults to true -->
<inputApk>${project.build.directory}/${project.artifactId}-${project.version}.apk</inputApk>
<outputApk>${project.build.directory}/MyApp_v${project.version}.apk</outputApk>
</zipalign>
<sign>
<debug>false</debug>
</sign>
</configuration>
<executions>
<execution>
<id>zipalign</id>
<phase>verify</phase>
<goals>
<goal>zipalign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
我使用了 Novoda tutorial对于上述(另一个类似的例子 here 我也尝试过,但效果相同),并且正在执行 mvn clean install -Prelease
,但是我收到以下错误:
[INFO] jarsigner: attempt to rename C:\android-projects\jameselsey_andsam_branch_mavenbranch\target\LanguageSelection-1.0.0-SNAPSHOT.jar to C:\android-projects\jameselsey_ands
am_branch_mavenbranch\target\LanguageSelection-1.0.0-SNAPSHOT.jar.orig failed
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed executing 'cmd.exe /X /C "C:\development\tools\Java\jdk1.6.0_20\jre\..\bin\jarsigner.exe -verbose -keystore my-release-key.keystore -storepass '*****' -keypass '
*****' C:\android-projects\jameselsey_andsam_branch_mavenbranch\target\LanguageSelection-1.0.0-SNAPSHOT.jar mykeystore"' - exitcode 1
[INFO] ------------------------------------------------------------------------
据我所知,重命名失败是因为该特定文件在打包阶段仍在使用,因此它基本上已锁定。
我该如何纠正这个问题?我不完全确定为什么 .jar
正在签名,不应该只是最后的.apk
那会被签名吗?
我尝试添加 <destDir>
(如 previous SO 帖子所建议)将 Artifact 移出,但这似乎没有任何效果,可能是因为我没有正确使用它。
有什么建议吗?
干杯
编辑:如果我从错误消息中取出命令并运行它,替换为 '*****'
对于 mypassword
, 它工作正常....
最佳答案
尝试了所有我能想到的但无法让 maven-jarsigner-plugin
运行,但是通过使用 maven-jar-plugin
我能够签名我的应用程序使用它。不幸的是,该插件已被略微弃用,它指的是使用 jarsigner 插件,但它对我有用。
写了一个tutorial here对于可能陷入同一问题的任何其他人。
关于Android maven jarsigner,jarsigner : attempt to rename X but failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7421710/
我已经阅读了几个小时的 rsync 文档,但我无法弄清楚如何向 rsync 传达如何仅重命名(而不是重新上传文件夹及其内容)目标文件夹,当它们在资源。 我正在使用 SSH 连接到目的地,本地文件夹是源
我正在使用 MySQL。这是一个例子,我想将表 A 重命名为 B,那么以下语句之间有什么区别: alter table A rename to B; 还有这个: rename table A to B
当我在解决方案资源管理器中选择文件或目录并按下 F2 键时,我试图让 Visual Studio 重命名文件。但是,我还希望 Visual Studio 在我按 F2 时进行重构重命名,并且我在编辑器
我无法让 objcopy --rename-sym 工作。 在一个新的 Android 项目中,我创建了目录 jni 和文件 stub.c: #include #include "dlog.h" j
MKPinAnnotationView 在 iOS 15 中重命名为 MKMarkerAnnotationView。 在 iOS 14 之前,我将 MKPinAnnotationView 子类化为 c
如果您调用 os.rename提供不存在的文件或目录,OSError通过将其设置为 None 来忽略文件名.这是 2.6 中的错误,已在某些更高版本中修复? 您只需执行以下操作即可重现该问题: pyt
假设我的前面板有 100 个按钮,名称为“按钮 1”...“按钮 100”。如何快速将它们全部重命名为“Push Button 1”...“Push Button 100”? 最佳答案 与 Dave_
考虑下面这个愚蠢的例子 theory meta_all imports Main begin lemma strict_subset: "⟦ A ⊂ B ⟧ ⟹ ∃a ∈ B. a ∉ A" appl
我正在尝试使用以下代码重命名节点,我需要将节点的 ID 和新名称传递给 server.aspx 如何获取节点的新名称 如何将这两个值传递到 server.aspx 页面 谢谢 .bind("re
我需要一个脚本,允许我将文件名剥离到文件夹中的文件,并将文件夹名称应用于文件,并在每个文件名的末尾添加一个递增的数字。 因此文件名在其原始状态下看起来像这样: gdgeregdja34gtj.jpg
以前,在突出显示 Java 文件中的变量名称后使用 ALT+COMMAND+R 组合键将进入重命名重构模式。现在,组合键将突出显示的文本替换为注册商标符号。 如何让组合键进入重命名重构模式而不是插入符
我有一个 Linux Qt 应用程序,它创建了一些 QThreads . 我知道当你创建一个线程时,它会继承父名,当我使用 htop 时我可以看到它。或 ps ax -L . 是否可以通过像 ps a
在处理器中,为什么我们不能简单地增加寄存器的数量,而不是拥有一个巨大的重新排序缓冲区并映射寄存器以解决名称依赖关系? 最佳答案 原因很多。 首先,我们经常设计微架构来执行现有架构的程序。添加寄存器会改
rename如果 newname 指向不同的驱动器,实际上会复制文件(至少在 Windows 10 平台上)。 有没有办法避免这种情况?我希望它在这种情况下失败。 假设我要移动 100 GB 的文件。
从业务角度来看,问题就出在这里 我们有许多人们使用的共享文件夹,我们称之为//shared/the/drive。但是,我们的服务器可能知道这个共享驱动器是其他名称,可能是 //ir83pn3br8mw
我从 XML 文件中读出它们的类别,然后重命名并保存它们的年份。因此,文件“XYZ.xml”现在是“News_2014.xml”。 问题是,从 2014 年开始,有多个 XML 文件的类别为“新闻”。
假设您有一个名为 foo 的文件包含一些确定的字节序列 X ,并且您想自动将其替换为名为 bar 的文件包含一个字节序列 Y .这通常使用 rename() 完成系统调用---在这种情况下,通过调用r
我正在尝试重命名用户指定目录中的一堆文件,但它似乎只在用户指定程序运行的目录时才有效。例如,从命令行运行时: ./a.out 。 “NewName.txt” 将起作用,而 ./a.out .. "Ne
这个问题可能看起来有点奇怪,但我会尝试对用例进行一些争论。 假设您有一个二维(笛卡尔)场的通用实现,其维度为 dim1 和 dim2,坐标为 c1 和 c2。 struct Field2D { s
我正在使用一个 php 应用程序,其中有一行用于移动文件。我将该方法包含在一个 try...catch block 中,因此,如果抛出错误,可以管理回滚系统。但是从未捕获到异常,那么重命名会引发任何类
我是一名优秀的程序员,十分优秀!