ionicパッケージエラーExecution failed for task':processDebugResource'


ionicプロジェクトパッケージ運転命令ionic build androidの時にエラーが発生しました.
  • エラーの詳細は以下の通りです.
    :processDebugResourcesERROR: In  FontFamilyFont, unable to find attribute android:fontVariationSettings
    ERROR: In  FontFamilyFont, unable to find attribute android:ttcIndex
    
     FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':processDebugResources'.
    > com.android.ide.common.process.ProcessException: Failed to execute aapt
    
    
    BUILD FAILED
    
    Total time: 27.96 secs
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Error: cmd: Command failed with exit code 1 Error output:
    ERROR: In  FontFamilyFont, unable to find attribute android:fontVariationSettings
    ERROR: In  FontFamilyFont, unable to find attribute android:ttcIndex
    
    
    FAILURE: Build failed with an exception.
    
     * What went wrong:
    Execution failed for task ':processDebugResources'.
    > com.android.ide.common.process.ProcessException: Failed to execute aapt
    
     * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  • 解決方法:
  • コマンドを実行しました.nic cordva plotform add androidはAndroidプラットフォームを追加しました.直接カタログを開けます.プロジェクト/playform/build.gradleファイルの中からdef adSigningPropsを見つけました.この方法の前に下記の内容を追加します.
    gradle.taskGraph.whenReady { taskGraph ->
        taskGraph.getAllTasks().each() { task ->
            if (task.name == 'validateReleaseSigning' || task.name == 'validateSigningRelease') {
                promptForReleaseKeyPassword()
            }
        }
    }
    
    def addSigningProps(propsFilePath, signingConfig) {
    ...
    }
  • 原因分析
  • comple「comp.android.support:support-v 4:+」は最新バージョンを指す言葉です.
    フォース'comp.android.support:support-v 4:27.1.0'追加フォース強制指定annotations