今天我想从我的应用程序生成一个APK,但我收到以下错误:
在不一致的位置观察到包ID'附加组件; addon-google_apis-google-19'
完整错误报告:
Information:Gradle tasks [:MyApp:assembleRelease]
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location 'C:\Users\MyUser\AppData\Local\Android\sdk\add-ons\addon-google_apis-google-19-1' (Expected 'C:\Users\MyUser\AppData\Local\Android\sdk\add-ons\addon-google_apis-google-19')
:MyApp:preBuild UP-TO-DATE
:MyApp:preReleaseBuild UP-TO-DATE
:MyApp:checkReleaseManifest
:MyApp:preDebugBuild UP-TO-DATE
:MyAppEssentialsLib:preBuild UP-TO-DATE
:MyAppEssentialsLib:preReleaseBuild UP-TO-DATE
:MyAppEssentialsLib:compileReleaseNdk UP-TO-DATE
:MyAppEssentialsLib:compileLint
:MyAppEssentialsLib:copyReleaseLint UP-TO-DATE
:MyAppEssentialsLib:checkReleaseManifest
:MyAppEssentialsLib:preDebugAndroidTestBuild UP-TO-DATE
:MyAppEssentialsLib:preDebugBuild UP-TO-DATE
:MyAppEssentialsLib:preDebugUnitTestBuild UP-TO-DATE
:MyAppEssentialsLib:preReleaseUnitTestBuild UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportAnimatedVectorDrawable2330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportAppcompatV72330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportDesign2330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportSupportV132330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportSupportV42330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportSupportVectorDrawable2330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComFacebookAndroidFacebookAndroidSdk460Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGithubAfollestadMaterialDialogsCore0856Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGithubJkwiecienEasyImage109Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:MyAppEssentialsLib:prepareDeHdodenhofCircleimageview200Library UP-TO-DATE
:MyAppEssentialsLib:prepareMeZhanghaiAndroidMaterialprogressbarLibrary114Library UP-TO-DATE
:MyAppEssentialsLib:prepareReleaseDependencies
:MyAppEssentialsLib:compileReleaseAidl UP-TO-DATE
:MyAppEssentialsLib:compileReleaseRenderscript UP-TO-DATE
:MyAppEssentialsLib:generateReleaseBuildConfig UP-TO-DATE
:MyAppEssentialsLib:generateReleaseAssets UP-TO-DATE
:MyAppEssentialsLib:mergeReleaseAssets UP-TO-DATE
:MyAppEssentialsLib:generateReleaseResValues UP-TO-DATE
:MyAppEssentialsLib:generateReleaseResources UP-TO-DATE
:MyAppEssentialsLib:mergeReleaseResources UP-TO-DATE
:MyAppEssentialsLib:processReleaseManifest UP-TO-DATE
:MyAppEssentialsLib:processReleaseResources UP-TO-DATE
:MyAppEssentialsLib:generateReleaseSources UP-TO-DATE
:MyAppEssentialsLib:compileReleaseJavaWithJavac UP-TO-DATE
:MyAppEssentialsLib:extractReleaseAnnotations UP-TO-DATE
:MyAppEssentialsLib:mergeReleaseProguardFiles UP-TO-DATE
:MyAppEssentialsLib:packageReleaseRenderscript UP-TO-DATE
:MyAppEssentialsLib:packageReleaseResources UP-TO-DATE
:MyAppEssentialsLib:processReleaseJavaRes UP-TO-DATE
:MyAppEssentialsLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:MyAppEssentialsLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:MyAppEssentialsLib:mergeReleaseJniLibFolders UP-TO-DATE
:MyAppEssentialsLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:MyAppEssentialsLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:MyAppEssentialsLib:bundleRelease UP-TO-DATE
:MyApp:prepareComAndroidSupportAnimatedVectorDrawable2330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportAppcompatV72330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportDesign2330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportV132330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportV42330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportVectorDrawable2330Library UP-TO-DATE
:MyApp:prepareComFacebookAndroidFacebookAndroidSdk460Library UP-TO-DATE
:MyApp:prepareComGithubAfollestadMaterialDialogsCore0856Library UP-TO-DATE
:MyApp:prepareComGithubJkwiecienEasyImage109Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:MyApp:prepareDeHdodenhofCircleimageview200Library UP-TO-DATE
:MyApp:prepareMeZhanghaiAndroidMaterialprogressbarLibrary114Library UP-TO-DATE
:MyApp:prepareReleaseDependencies
:MyApp:compileReleaseAidl UP-TO-DATE
:MyApp:compileReleaseRenderscript UP-TO-DATE
:MyApp:generateReleaseBuildConfig UP-TO-DATE
:MyApp:generateReleaseAssets UP-TO-DATE
:MyApp:mergeReleaseAssets UP-TO-DATE
:MyApp:generateReleaseResValues UP-TO-DATE
:MyApp:processReleaseGoogleServices
:MyApp:generateReleaseResources
:MyApp:mergeReleaseResources UP-TO-DATE
:MyApp:processReleaseManifest UP-TO-DATE
:MyApp:processReleaseResources UP-TO-DATE
:MyApp:generateReleaseSources UP-TO-DATE
:MyApp:compileReleaseJavaWithJavac UP-TO-DATE
:MyApp:compileReleaseNdk UP-TO-DATE
:MyApp:compileReleaseSources UP-TO-DATE
:MyApp:lintVitalRelease
:MyApp:prePackageMarkerForRelease
:MyApp:transformClassesWithDexForRelease UP-TO-DATE
:MyApp:mergeReleaseJniLibFolders UP-TO-DATE
:MyApp:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:MyApp:processReleaseJavaRes UP-TO-DATE
:MyApp:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:MyApp:validateExternalOverrideSigning
:MyApp:packageRelease UP-TO-DATE
:MyApp:zipalignRelease
Unable to open 'C:\Users\MyApp-release.apk' as zip archive
Error:Execution failed for task ':MyApp:zipalignRelease'.
> Process 'command 'C:\Users\MyUser\AppData\Local\Android\sdk\build-tools\23.0.2\zipalign.exe'' finished with non-zero exit value 1
如果我想构建一个APK,我只会收到此错误,我可以在调试模式下运行我的应用。
我搜索了interwebz回合没有找到任何解决方案,只有一些谷歌论坛,但没有任何我可以用来解决的问题。
M aybe,因为这个,apk版本没有失败,但据我所知,该消息并未真正解决任何其他问题。
如果可以,请告诉我。
答案 0 :(得分:4)
这是因为升级SDK而导致包名称发生了一些变化。由于这只是一个警告,可以安全地忽略它。
无论如何,要删除警告,请删除所有Android SDK Build Tools 19.x
。它应该只显示Android SDK Buld Tools 19.1
之后。安装该版本
回来了,你应该好好去。
来源:https://code.google.com/p/android/issues/detail?id=199518