本文介绍了使用Google Map时生成签名的APK时出错?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我在生成签名的apk时遇到此错误:

Hello i am getting this error while generating signed apk :

      Error:Execution failed for task ':app:lintVitalRelease'.
        > Lint found fatal errors while assembling a release target.
       To proceed, either fix the issues identified by lint, or modify your      build script as follows:
         ...
       android {
       lintOptions {
        checkReleaseBuilds false
          // Or, if you prefer, you can continue to check for errors in release builds,
         // but continue the build even when errors are found:
        abortOnError false
        }
       }

这是我的清单:

       <?xml version="1.0" encoding="utf-8"?>
       <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="android.OMMSoftware.Navsahydri">

       <uses-permission android:name="android.permission.INTERNET" />
       <uses-permission  android:name="android.permission.ACCESS_NETWORK_STATE"  />
       <uses-permission
       android:name="android.permission.ACCESS_FINE_LOCATION"
       android:protectionLevel="signature" />
       <uses-permission
       android:name="android.permission.ACCESS_COARSE_LOCATION"
       android:protectionLevel="signature" />

       <uses-library
       android:name="com.google.android.maps"
       android:required="true" />

       <application
        android:allowBackup="true"
        android:icon="@drawable/logo_circular"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/MyMaterialTheme">
       <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="AIzaSyDjqmmXd1d1yk7BtncDQgXSmya-NdBkc2w" />

        <activity android:name=".Splash">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        </activity>
        <activity android:name=".Home" />
        <activity android:name=".Gallery" />
        <activity android:name=".Contactus" />
        <activity android:name=".Placements"></activity>
        </application>
        </manifest>

代码没有错误,即使正在构建apk,但是当我尝试生成签名的apk时,它显示上述错误,我在我的项目中使用google map.请帮助.

code is error free,even apk is building,but when i try to generate signed apk it shows above error,I am using google map in my project.Please help.

推荐答案

用于Gradle的Android插件允许您使用 lintOptions {} 阻止在模块级build.gradle文件中.

The Android plugin for Gradle allows you to configure certain lint options, such as which checks to run or ignore, using the lintOptions {} block in your module-level build.gradle file.

  android {
  ...
  lintOptions {
            checkReleaseBuilds false
            abortOnError false
            ignoreWarnings true //false
              }
       }

然后清理重建运行.

这篇关于使用Google Map时生成签名的APK时出错?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 11:54