티스토리 뷰

반응형

Stack Overflow에 자주 검색, 등록되는 문제들과 제가 개발 중 찾아 본 문제들 중에서 나중에도 찾아 볼 것 같은 문제들을 정리하고 있습니다.

Stack Overflow에서 가장 먼저 확인하게 되는 가장 높은 점수를 받은 Solution과 현 시점에 도움이 될 수 있는 가장 최근에 업데이트(최소 점수 확보)된 Solution을 각각 정리하였습니다.

 

아래 word cloud를 통해 이번 포스팅의 주요 키워드를 미리 확인하세요.

Running "cordova build android" - unable to find attribute android:fontVariationSettings and android:ttcIndex

cordova build android" 명령어 실행 중 "unable to find attribute android:fontVariationSettings and android:ttcIndex" 오류 수정하기

 문제 내용 

When I run cordova build android --buildConfig xxxx --release, I get the following error:

"cordova build android --buildConfig xxxx --release" 명령어를 실행하면 다음과 같은 오류가 발생합니다.
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex

 

The strange thing is I use two macOS machines for the compilation, and I get this error only on one of them for the same code.

이상한 점은 동일한 코드에 대해 두 대의 macOS 기기에서 컴파일을 수행하고, 이 에러를 얻는 것은 그 중 하나의 기기에서만 발생한다는 것입니다.

 

Here is the output of ./gradlew cdvPrintProps I get on the two machines:

다음은 두 대의 기계에서 실행한 './gradlew cdvPrintProps'의 출력입니다:
:cdvPrintProps
cdvCompileSdkVersion=26
cdvBuildToolsVersion=27.0.3
cdvVersionCode=null
cdvMinSdkVersion=21
cdvBuildMultipleApks=true
cdvReleaseSigningPropertiesFile=release-signing.properties
cdvDebugSigningPropertiesFile=null
cdvBuildArch=null
computedVersionCode=152045989
computedArmv7VersionCode=1520459892
computedX86VersionCode=1520459894

 

Below is the list of plugins used:

다음은 두 대의 기계에서 실행한 './gradlew cdvPrintProps'의 출력입니다:
$ cordova plugins list
cordova-custom-config 5.0.2 "cordova-custom-config"
cordova-fabric-plugin 1.1.10 "cordova-fabric-plugin"
cordova-open-native-settings 1.5.0 "Native settings"
cordova-plugin-app-event 1.2.1 "Application Events"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine"
cordova-plugin-datepicker 0.9.2 "DatePicker"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-email 1.2.7 "EmailComposer"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-inappbrowser 1.7.2 "InAppBrowser"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-secure-storage 2.6.8 "SecureStorage"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.4.1 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova.plugins.diagnostic 3.9.2 "Diagnostic"
de.appplant.cordova.plugin.local-notification 0.8.5 "LocalNotification"
ionic-plugin-keyboard 2.2.1 "Keyboard"

 

How can I fix this problem?

이 문제를 어떻게 해결할 수 있을까요?

 

 

 

 높은 점수를 받은 Solution 

Just put following in build-extras.gradle

build-extras.gradle에 following만 넣어주세요
configurations.all {
    resolutionStrategy {
        force 'com.android.support:support-v4:27.1.0'
    }
}

 

 

 가장 최근 달린 Solution 

I found the solution on Ionic Forum, which was the only solution that worked for me:

Ionic Forum에서 솔루션을 찾았는데, 이 솔루션이 저에게 유일하게 효과가 있었습니다:

 

Run:

실행:

ionic cordova platform rm android

 

Run:

실행:

ionic cordova platform add android@8.0.0

 

Run:

실행:

ionic cordova plugin add cordova-plugin-androidx

 

Run:

실행:

ionic cordova plugin add cordova-plugin-androidx-adapter

 

Make sure your gradle.properties has:

gradle.properties에 다음이 있는지 확인합니다:

 

cdvMinSdkVersion=19

 

Make sure your build.gradle has:

build.gradle에 다음이 있는지 확인합니다:
project.ext { defaultBuildToolsVersion="28.0.3" //String 

defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4 

defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default 

defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default }

 

Make sure your config.xml has:

config.xml에 다음이 있는지 확인하십시오:
<preference name="android-minSdkVersion" value="19" />

 

from: https://forum.ionicframework.com/t/firebase-app-unable-to-compile-on-android-with-aapt-error/166564/7

 

which is also handled in the stackoverflow answer: https://stackoverflow.com/a/56656680/839691

스택 오버플로 응답에서도 처리됩니다: https://stackoverflow.com/a/56656680/839691

 

 

 

출처 : https://stackoverflow.com/questions/49162538/running-cordova-build-android-unable-to-find-attribute-androidfontvariation

반응형
댓글
공지사항
최근에 올라온 글