android開發打包簽名出現-failed to export application的解決思路

       在app發佈到應用平臺的時候需要打包簽名,這個時候會遇到一些頭疼的事情,比如打包失敗會出現failed to export application錯誤等。我這裏就給大家講一下我的深刻體會。本文爲什麼說是思路而不是解決方法呢?因爲一千個讀者就有一千個哈姆雷特,不同的adt環境會出現各種奇葩的問題,所以我不敢保證解決所有打包失敗的問題,之體提供給大家一種解決問題的思路。僅供參考。

 

1、查看錯誤詳情,根據詳情搜索錯誤碼的原因

      打包時候出現 failed to export application 不要慌,如果可以查看詳情,也就是see details 那還好辦點,這個時候點擊去查看詳情,總會有錯誤提示,然後進行google或者上stackoverflow找找,比如下面這個問題

http://stackoverflow.com/questions/8506781/failed-to-export-android-application-eclipse

或者 http://stackoverflow.com/questions/9098684/android-failed-to-export-application-with-error-1073741819

2、根據log日誌中的錯誤提示去搜索或者修改

這些問題都可以搜得到,但是如果沒有查看詳細錯誤的時候怎麼辦?不要慌,你可以直接找log查看

log就再你的工作空間---workspace的.metadata文件中

如圖

wKiom1VKCUeA0Ph_AAFzbRyzk_c387.jpg

在log中的排序是按照時間一直往下累計的。所以只需要找到最後的那條log

比如

!MESSAGE Product adtproduct could not be found.


!ENTRY org.eclipse.egit.ui 2 0 2015-05-06 20:06:44.913

!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level

Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.

The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in

this system level configuration. The Git installation location can be configured on the

Team > Git > Configuration preference page's 'System Settings' tab.

This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.


!ENTRY org.eclipse.egit.ui 2 0 2015-05-06 20:06:44.918

!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git

user global configuration and to define the default location to store repositories: 'C:\Users\ydzy_'. If this is

not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and

EGit might behave differently since they see different configuration options.

This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.


!ENTRY org.eclipse.ui 2 2 2015-05-06 20:08:20.327

!MESSAGE Invalid property category path: ValidationPropertiesPage (bundle: org.eclipse.wst.xml.ui, propertyPage: org.eclipse.wst.xml.ui.propertyPage.project.validation)


!ENTRY org.tigris.subversion.subclipse.core 4 -6 2015-05-06 20:08:39.031

!MESSAGE Could not remove D:\wo_2015_2_26\SmokerTreasure\bin\dexedLibs\ShareSDK-Core-2.5.7-4ded32aebe63ec39c806e661b9a56f1d.jar

!STACK 0

java.lang.IllegalStateException: Could not remove D:\wo_2015_2_26\SmokerTreasure\bin\dexedLibs\ShareSDK-Core-2.5.7-4ded32aebe63ec39c806e661b9a56f1d.jar

at org.tigris.subversion.subclipse.core.resourcesListeners.RevertResourceManager$RevertWorkspaceJob.revertResources(RevertResourceManager.java:65)

at org.tigris.subversion.subclipse.core.resourcesListeners.RevertResourceManager$RevertWorkspaceJob.runInWorkspace(RevertResourceManager.java:85)

at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)


比如出現Export Wizard Error等字樣,你可以查看 具體的原因或者google



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章