2017-04-04 9 views
1

署名APKを生成しながら、こんにちは、私はこのエラーを取得しています:Googleマップを使用すると署名付き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マップを使用しています。助けてください。

+0

あなたの 'build.gradle'に' lintOptions'を追加しようとしましたか? – antonio

+0

いいえ、まだありません。追加する必要がありますか? – Abhijeet

答えて

1

GradleのためのAndroidのプラグインは、あなたのモジュールレベルのbuild.gradleファイルにlintOptions {}ブロックを使用して、実行するか、または無視するチェックかなどの、特定のlintオプションを設定することができます。

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

はその後実行をクリーン再構築します。

+1

これは動作します...ありがとうございます。 – Abhijeet

+0

@Abhijeet喜んで聞いてください。前に移動してください。 –

関連する問題