J.BF Story
[Flutter] 네이버 맵 이슈 본문
저번에 발생했던 SDK 버전 에러가 또 발생했다
(참고: [Flutter] Error: Execution failed for task ':app:checkDebugAarMetadata'.)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Multiple task action failures occurred:
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-32).
Dependency: androidx.core:core:1.9.0-beta01.
AAR metadata file: /Users/testuser/.gradle/caches/transforms-2/files-2.1/57371525baf7817750fea81058f3c81c/core-1.9.0-beta01/META-INF/com/android/build/gradle/aar-metadata.properties.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-32).
Dependency: androidx.core:core-ktx:1.9.0-beta01.
AAR metadata file: /Users/testuser/.gradle/caches/transforms-2/files-2.1/324de13c2de15151cc6e4343a54076ac/jetified-core-ktx-1.9.0-beta01/META-INF/com/android/build/gradle/aar-metadata.properties.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 53s
Running Gradle task 'assembleDebug'... 115.9s
┌─ Flutter Fix ──────────────────────────────────────────────────────┐
│ [!] Your project requires a higher compileSdkVersion. │
│ Fix this issue by bumping the compileSdkVersion in │
│ /Users/testuser/Documents/__test/test/android/app/build.gradle: │
│ android { │
│ compileSdkVersion 33 │
│ } │
└────────────────────────────────────────────────────────────────────┘
Exception: Gradle task assembleDebug failed with exit code 1
저번에는 SDK 31에서 SDK 32로 변경해서 문제를 해결해서 이번에도 SDK 32에서 SDK 33으로 변경했다
하지만 SDK 33으로 설정하니 다른 플러그인에서 문제가 생겼다
'flutter_quill'이란 플러그인이었는데 다음과 실행 시 다음과 같은 에러가 발생한다
/Users/testuser/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview_quill-5.4.6/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:280: error: cannot find symbol
settings.setAppCachePath(options.appCachePath);
^
symbol: method setAppCachePath(String)
location: variable settings of type WebSettings
/Users/testuser/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview_quill-5.4.6/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:494: error: cannot find symbol
settings.setAppCacheEnabled(false);
^
symbol: method setAppCacheEnabled(boolean)
location: variable settings of type WebSettings
/Users/testuser/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview_quill-5.4.6/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:504: error: cannot find symbol
settings.setAppCacheEnabled(true);
^
symbol: method setAppCacheEnabled(boolean)
location: variable settings of type WebSettings
/Users/testuser/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview_quill-5.4.6/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:515: error: cannot find symbol
settings.setAppCachePath(ctx.getCacheDir().getAbsolutePath());
^
symbol: method setAppCachePath(String)
location: variable settings of type WebSettings
/Users/testuser/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview_quill-5.4.6/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:517: error: cannot find symbol
settings.setAppCacheEnabled(true);
^
symbol: method setAppCacheEnabled(boolean)
location: variable settings of type WebSettings
/Users/testuser/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview_quill-5.4.6/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:521: error: cannot find symbol
settings.setAppCacheEnabled(false);
^
symbol: method setAppCacheEnabled(boolean)
location: variable settings of type WebSettings
/Users/testuser/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview_quill-5.4.6/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:767: error: cannot find symbol
settings.setAppCachePath(newOptions.appCachePath);
^
symbol: method setAppCachePath(String)
location: variable settings of type WebSettings
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
7 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':flutter_inappwebview_quill:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 14s
Running Gradle task 'assembleDebug'... 136.2s
Exception: Gradle task assembleDebug failed with exit code 1
이 에러를 해결하기 위해 여러 검색과 시도를 해봤지만 현재는 명확한 해결책이 없어보였다 (해당 에러에 대한 깃 이슈 참고)
(SDK 32는 네이버 맵이 문제, SDK 33은 다른 플러그인이 문제 -> 진퇴양난)
그리고 SDK버전이 계속 변경되어 버전, 디펜던시 이슈가 생기는 것이 추후 유지보수에도 불안정해보였다
(계속 변경되는 이유는 아마 네이버 맵 API를 중간 플러그인을 통해 사용하기 때문에 최신 버전으로 연결되어 일어나는 현상인 것같다)
그래서 네이버 맵에서 구글 맵으로 변경하고자 한다
Flutter가 구글에서 만든 것이기 때문에 구글 맵과 호환성도 좋을 것같고 원하는 지도 기능을 구현하는데 문제가 없을 것 같다
'FrontEnd > Flutter' 카테고리의 다른 글
[Flutter] Error: Execution failed for task ':app:checkDebugAarMetadata'. (0) | 2022.06.24 |
---|---|
[Flutter] Widget 생성 시 함수 호출 (0) | 2022.06.15 |
[Dart] 함수 Optional Parameter 기본값 설정 (0) | 2022.06.12 |
[Flutter] 네이버 맵 연결 (0) | 2022.06.06 |
Comments