Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

android - Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location

Today I wanted to generate an APK from my app but i got the following error:

Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location

Full error report:

Information:Gradle tasks [:MyApp:assembleRelease]
    Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location 'C:UsersMyUserAppDataLocalAndroidsdkadd-onsaddon-google_apis-google-19-1' (Expected 'C:UsersMyUserAppDataLocalAndroidsdkadd-onsaddon-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:UsersMyApp-release.apk' as zip archive
    Error:Execution failed for task ':MyApp:zipalignRelease'.
    > Process 'command 'C:UsersMyUserAppDataLocalAndroidsdkuild-tools23.0.2zipalign.exe'' finished with non-zero exit value 1

I only get this error if i want to build an APK, I can run my app in debug mode.

I have searched the interwebz bout didnt found any solution, only some google forums but not anything that I could use for solution.

Maybe the the apk generation is not failing because of this, but the message don't really contians any other issues, as far as I see.

Please advice me if you can.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This is caused by upgrading SDK which has some changes in package names. Since this is just a warning, it could safely be ignored.

Anyway, to remove the warning,remove all Android SDK Build Tools 19.x. It should only show Android SDK Buld Tools 19.1 afterward. Install that version back, and you should be good to go.

Source: https://code.google.com/p/android/issues/detail?id=199518


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...