묻고 답해요
141만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결배달앱 클론코딩 [with React Native]
tmap 연동 실패
현재 세팅을 모두 완료한 상태에서 `npm run android --reset-cache`를 했을 때, 실패를 하게 됩니다. ./gradlew clean으로 설정을 마무리 했을 때 같은 문제가 발생합니다. 현재 T-map 설치 sdk 버전은 com.skt.Tmap_1.76.jar입니다. rn 버전은 0.74입니다. 아래와 같이 세팅은 모두 마친 상태에서 다음과 같이 에러가 발생하고 있습니다. github commit : https://github.com/kd02109/react-native-delivery/commit/590f740f6fae2f42499c6c20af7e7e775cb76ab0 Error log Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. 203 actionable tasks: 199 executed, 4 up-to-date info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\Users\-\Desktop\Github\ReactnativeDelivery\node_modules\react-native-image-resizer\android\src\main\java\fr\bamlab\rnimageresizer\ImageResizerModule.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\Users\-\Desktop\Github\ReactnativeDelivery\node_modules\react-native-permissions\android\src\main\java\com\zoontek\rnpermissions\RNPermissionsPackage.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 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. Note: C:\Users\-\Desktop\Github\ReactnativeDelivery\node_modules\react-native-safe-area-context\android\src\paper\java\com\th3rdwave\safeareacontext\NativeSafeAreaContextSpec.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\Users\-\Desktop\Github\ReactnativeDelivery\node_modules\react-native-screens\android\src\paper\java\com\swmansion\rnscreens\NativeScreensModuleSpec.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:25:35 Unexpected tokens (use ';' to separate expressions on the same line) e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:26:111 Expecting ')' e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:49:1 Expecting a top level declaration e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:14:12 Unresolved reference: microsoft e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:22:13 Unresolved reference: PackageList e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:25:17 Unresolved reference: add e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:25:21 Unresolved reference: TMapPackage e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:26:17 Unresolved reference: add e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:26:21 Unresolved reference: CodePush e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:26:49 Unresolved reference: CodePushDeploymentKey e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:30:9 'getJSMainModuleName' overrides nothing e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:32:9 'getUseDeveloperSupport' overrides nothing e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:34:9 'isNewArchEnabled' overrides nothing e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:35:9 'isHermesEnabled' overrides nothing e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:38:3 Modifier 'override' is not applicable to 'top level property without backing field or delegate' e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:39:33 Unresolved reference: applicationContext e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:39:53 Unresolved reference: reactNativeHost e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:41:3 Modifier 'override' is not applicable to 'top level function' e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:42:5 No supertypes are accessible in this context e: file:///C:/Users/-/Desktop/Github/ReactnativeDelivery/android/app/src/main/java/com/reactnativedelivery/MainApplication.kt:43:19 'this' is not defined in this context FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction > Compilation error. See log for more details어떤 방식으로 해결을 해야 할까요? 해당 세팅 방식은 제로초님의 repo중 https://github.com/ZeroCho/food-delivery-app/tree/master/rn73을 참고했습니다. 출발 지점을 클릭하게 되면 해당 openNavi 자체 모듈을 찾아서 실행할 수 없다는 에러가 발생하고 있는 상황입니다. andoroid에서 add package, T-map api 가이드를 모두 진행하고 키도 도입한 상황에서 실행이 되지 않고 있습니다..
-
미해결배달앱 클론코딩 [with React Native]
ios simulator tmap setup 관련
안녕하세요 강의 잘 보고 있는 수강생입니다. 현재 rn 0.68.2v 을 사용하면서 graddle version issue인지, 혹은 개발환경 세팅 issue인지는 모르겠으나 안드로이드에서 gradle build 관련하여 문제가 있어 ios만 실습중입니다. ios simulator에서는 별도로 앱스토어 접속하여 타 앱을 설치하는 것이 불가능한 것으로 알고 있는데, TMap 연동 강의와 Mac ch5 세팅 영상을 보아도 ios 시뮬에서 Tmap 앱을 설치하시는 모습이 안나와서 혹시나 시뮬에서는 구현이 안되고 실제 디바이스로 진행을 해야하는 지 궁금합니다.
-
미해결배달앱 클론코딩 [with React Native]
티맵을 Linking.openURL()로 여는 것은 어떤가요?
간단하게 실험해보니 손쉽게 열렸습니다. const goByTMap = useCallback(async () => { const destinationURL = 'tmap://route?goalname=분당서울대병원&goalx=127.122930&goaly=37.351987' if (await Linking.canOpenURL(destinationURL)) await Linking.openURL(destinationURL) }, []) 네이티브 소스를 수정해서 브릿징하는 연습을 해본 것은 너무 좋았습니다. 이런 교육적 의도 말고도 url scheme을 Linking으로 여는 것에 어떤 맹점이 있나요? 가령 url scheme이 변경될 소지가 있더던지? 보안이나 다른 문제가 있을까요?
-
미해결배달앱 클론코딩 [with React Native]
iOS(아이폰)에서 티맵 못 여는 문제 해결
강의대로 하면 아이폰에서 티맵 연동을 위해 Ing.tsx 페이지에서 path나 marker를 클릭했을 때 tmap이 설치되지 않았다는 Alert가 뜹니다. 이 때 xcode 콘솔에 아래와 같은 메시지가 나타납니다. 2022-04-15 13:56:50.123541+0900 FoodDeliveryApp[16779:2877008] -canOpenURL: failed for URL: "tmap:" - error: "This app is not allowed to query for scheme tmap" 2022-04-15 13:56:50.126746+0900 FoodDeliveryApp[16779:2877216] [javascript] { installed: false } -canOpenURL 함수에서 "tmap" URL을 열 수 없다는 에러를 리턴했기 때문으로 보입니다. 따라서 AndroidManifest에 을 넣어준 것과 유사하게 info.plist에 다음과 같이 "tmap" scheme을 넣어주면 tmap을 열 수 있습니다. 에디터에선 이렇게.. xcode에서는 이렇게.. 안드로이드와 마찬가지로 매뉴얼에는 없고 질답을 검색해야 안내해주는군요 ㅋㅋ https://community.openapi.sk.com/t/ios/6565/4 매일 기도하는 마음으로 코딩하니 신실해지는 느낌입니다.