從「jarsigner -verify」的結果可以看出,我的APK確實已簽名,而且我仍然會安裝「Failure」。任何幫助將是偉大的!爲什麼adb因故障[INSTALL_PARSE_FAILED_NO_CERTIFICATES]失敗?
[email protected]:~/workspace/myapp$ ~/android-sdk-linux_15/platform-tools/adb install target/myapp-aligned.apk
3857 KB/s (352413 bytes in 0.089s)
pkg: /data/local/tmp/myapp-aligned.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[email protected]:~/workspace/OVIVO$ jarsigner -verify target/myapp-aligned.apk
jar verified.
[email protected]:~/workspace/myapp$ java -version
java version "1.6.0_23"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.2)
OpenJDK Server VM (build 20.0-b11, mixed mode)
[email protected]:~/workspace/myapp$
我要建這個項目maven3,從行家日誌可以在下面看到,無法找到任何東西應該導致破簽字的步驟,。
[email protected]:~/workspace/myapp$ mvn3 clean install -Pmyapp,monkey
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.goldengekko.myapp.selfcare:myapp-selfcare:apk:1.11-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-resources-plugin is missing. @ line 166, column 12
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing. @ line 213, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building com.goldengekko.myapp.selfcare:myapp-selfcare 1.11-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://maven.goldengekko.com:8001/nexus/content/groups/public/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml
Downloaded: http://maven........maven-metadata.xml (704 B at 0.5 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ myapp-selfcare ---
[INFO] Deleting /home/carl-emil/workspace/myapp/target
[INFO]
[INFO] --- build-helper-maven-plugin:1.5:parse-version (parse-version) @ myapp-selfcare ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default) @ myapp-selfcare ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 62 resources to res
[INFO] Copying 1 resource to res
[INFO] Copying 1 resource to res/values/
[INFO] Copying 1 resource to /home/carl-emil/workspace/myapp/target/filtered-manifest
[INFO]
[INFO] --- android-maven-plugin:3.1.1:generate-sources (default-generate-sources) @ myapp-selfcare ---
[DEBUG] Expanding: /home/carl-emil/.m2/repository/com/viewpagerindicator/library/2.2.3/library-2.2.3.apklib into /home/carl-emil/workspace/myapp/target/unpack/apklibs/com.viewpagerindicator_library_apklib_2.2.3
[DEBUG] expand complete
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] /home/carl-emil/android-sdk-linux_15/platform-tools/aapt [package, -m, -J, /home/carl-emil/workspace/myapp/target/generated-sources/r, -M, /home/carl-emil/workspace/myapp/target/filtered-manifest/AndroidManifest.xml, -S, /home/carl-emil/workspace/myapp/res, -S, /home/carl-emil/workspace/myapp/target/unpack/apklibs/com.viewpagerindicator_library_apklib_2.2.3/res, --auto-add-overlay, -A, /home/carl-emil/workspace/myapp/assets, -I, /home/carl-emil/android-sdk-linux_15/platforms/android-8/android.jar]
[INFO] /home/carl-emil/android-sdk-linux_15/platform-tools/aapt [package, -m, -J, /home/carl-emil/workspace/myapp/target/generated-sources/r, --custom-package, com.viewpagerindicator, -M, /home/carl-emil/workspace/myapp/target/filtered-manifest/AndroidManifest.xml, -S, /home/carl-emil/workspace/myapp/res, -S, /home/carl-emil/workspace/myapp/target/unpack/apklibs/com.viewpagerindicator_library_apklib_2.2.3/res, --auto-add-overlay, -A, /home/carl-emil/workspace/myapp/assets, -A, /home/carl-emil/workspace/myapp/target/unpack/apklibs/com.viewpagerindicator_library_apklib_2.2.3/assets, -I, /home/carl-emil/android-sdk-linux_15/platforms/android-8/android.jar]
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ myapp-selfcare ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 62 resources to res
[INFO] Copying 1 resource to res
[INFO] Copying 1 resource to res/values/
[INFO] Copying 1 resource to /home/carl-emil/workspace/myapp/target/filtered-manifest
[INFO] skip non existing resourceDirectory /home/carl-emil/workspace/myapp/target/generated-sources/extracted-dependencies/src/main/resources
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ myapp-selfcare ---
[INFO] Compiling 36 source files to /home/carl-emil/workspace/myapp/target/classes
[INFO]
[INFO] --- maven-antrun-plugin:1.6:run (FixManifest) @ myapp-selfcare ---
[INFO] Executing tasks
main:
inotify_add_watch: No such file or directory
[INFO] Executed tasks
[INFO]
[INFO] registerToSubTree : warning, failed to register /home/carl-emil/workspace/myapp/target/filtered-manifest/rep2865681923253179562.tmp :Error watching /home/carl-emil/workspace/myapp/target/filtered-manifest/rep2865681923253179562.tmp : No such file or directory--- android-maven-plugin:3.1.1:proguard (default-proguard) @ myapp-selfcare ---
inotify_add_watch: No such file or directory
registerToSubTree : warning, failed to register /home/carl-emil/workspace/myapp/target/filtered-manifest/rep244121430022461645.tmp :Error watching /home/carl-emil/workspace/myapp/target/filtered-manifest/rep244121430022461645.tmp : No such file or directory
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ myapp-selfcare ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/carl-emil/workspace/myapp/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ myapp-selfcare ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12:test (default-test) @ myapp-selfcare ---
[INFO] No tests to run.
[INFO] Surefire report directory: /home/carl-emil/workspace/myapp/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- android-maven-plugin:3.1.1:dex (default-dex) @ myapp-selfcare ---
[INFO] /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java [-Xmx1024M, -jar, /home/carl-emil/android-sdk-linux_15/platform-tools/lib/dx.jar, --dex, --output=/home/carl-emil/workspace/myapp/target/classes.dex, /home/carl-emil/.m2/repository/com/viewpagerindicator/library/2.2.3/library-2.2.3.apklib, /home/carl-emil/.m2/repository/android/support.v4/0.0.6/support.v4-0.0.6.jar, /home/carl-emil/.m2/repository/com/googlecode/androidannotations/androidannotations/2.4/androidannotations-2.4-api.jar, /home/carl-emil/workspace/myapp/target/classes, /home/carl-emil/.m2/repository/com/directionalviewpager/library/1.2.0/library-1.2.0.jar, /home/carl-emil/.m2/repository/com/google/code/gson/gson/1.6/gson-1.6.jar, /home/carl-emil/.m2/repository/com/sun/codemodel/codemodel/2.4.1/codemodel-2.4.1.jar]
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ myapp-selfcare ---
[INFO] Building jar: /home/carl-emil/workspace/myapp/target/myapp-selfcare.jar
[INFO]
[INFO] --- android-maven-plugin:3.1.1:apk (default-apk) @ myapp-selfcare ---
[INFO] Copying dependency assets files to combined assets directory.
[INFO] Copying local assets files to combined assets directory.
[INFO] /home/carl-emil/android-sdk-linux_15/platform-tools/aapt [package, -f, -M, /home/carl-emil/workspace/myapp/target/filtered-manifest/AndroidManifest.xml, -S, /home/carl-emil/workspace/myapp/res, -S, /home/carl-emil/workspace/myapp/target/unpack/apklibs/com.viewpagerindicator_library_apklib_2.2.3/res, --auto-add-overlay, -A, /home/carl-emil/workspace/myapp/target/generated-sources/combined-assets/assets, -I, /home/carl-emil/android-sdk-linux_15/platforms/android-8/android.jar, -F, /home/carl-emil/workspace/myapp/target/myapp-selfcare.ap_]
[INFO]
[INFO] --- maven-jarsigner-plugin:1.2:sign (signing) @ myapp-selfcare ---
[INFO] 2 archive(s) processed
[INFO]
[INFO] --- android-maven-plugin:3.1.1:zipalign (alignApk) @ myapp-selfcare ---
[INFO] Running command: /home/carl-emil/android-sdk-linux_15/tools/zipalign
[INFO] with parameters: [-f, 4, /home/carl-emil/workspace/myapp/target/myapp-selfcare.apk, /home/carl-emil/workspace/myapp/target/myapp-selfcare-aligned.apk]
[INFO] Attach /home/carl-emil/workspace/myapp/target/myapp-selfcare-aligned.apk to the project
[INFO]
[INFO] --- android-maven-plugin:3.1.1:internal-pre-integration-test (default-internal-pre-integration-test) @ myapp-selfcare ---
[INFO] No InstrumentationRunner found - skipping tests
[INFO]
[INFO] --- android-maven-plugin:3.1.1:internal-integration-test (default-internal-integration-test) @ myapp-selfcare ---
[INFO] No InstrumentationRunner found - skipping tests
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ myapp-selfcare ---
JNotifyAdapterLinux: warning, recieved event for an unregisted LinuxWD -1 ignoring...
JNotifyAdapterLinux: warning, recieved event for an unregisted LinuxWD -1 ignoring...
JNotifyAdapterLinux: warning, recieved event for an unregisted LinuxWD -1 ignoring...
[INFO] Installing /home/carl-emil/workspace/myapp/target/myapp-selfcare.apk to /home/carl-emil/.m2/repository/com/goldengekko/myapp/selfcare/myapp-selfcare/1.11-SNAPSHOT/myapp-selfcare-1.11-SNAPSHOT.apk
[INFO] Installing /home/carl-emil/workspace/myapp/pom.xml to /home/carl-emil/.m2/repository/com/goldengekko/myapp/selfcare/myapp-selfcare/1.11-SNAPSHOT/myapp-selfcare-1.11-SNAPSHOT.pom
[INFO] Installing /home/carl-emil/workspace/myapp/target/myapp-selfcare.jar to /home/carl-emil/.m2/repository/com/goldengekko/myapp/selfcare/myapp-selfcare/1.11-SNAPSHOT/myapp-selfcare-1.11-SNAPSHOT.jar
[INFO] Installing /home/carl-emil/workspace/myapp/target/myapp-selfcare-aligned.apk to /home/carl-emil/.m2/repository/com/goldengekko/myapp/selfcare/myapp-selfcare/1.11-SNAPSHOT/myapp-selfcare-1.11-SNAPSHOT-aligned.apk
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.769s
[INFO] Finished at: Fri Mar 23 08:59:37 UTC 2012
[INFO] Final Memory: 13M/64M
[INFO] ------------------------------------------------------------------------
是的,只粘貼日誌簽名部分周圍的行。 – erbsman 2012-03-23 08:57:57
現在我添加了maven的完整日誌。還有其他什麼是相關的,我應該在這裏添加以使我的問題更清晰?謝謝! – erbsman 2012-03-23 09:09:48
Maven日誌對我來說看起來很正常。你是否推薦安裝到模擬器或真實設備? – yorkw 2012-03-23 10:13:24