묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결배달앱 클론코딩 [with React Native]
nmap 에뮬레이터 build 관련 오류입니다..
호스트 운영체제 : windowsreact-native 버전 : 0.64강의에 나온 대로 commit부분 참조해 패키지 변경도 하였으며 강의에서 추가적으로 말씀해주신 proguard부분도 변경하였습니다.-keep class com.nomansland.gchatproject.BuildConfig{*}; 위 부분이 제 코드에는 없었으나 추가하여 넣었습니다../gradlew clean && ./gradlew.bat 을 실행한 후 react-native run-android를 실행했으나.. 아래와 같은 오류가 계속발생하는데 해결을 못해 질문드리게 되었습니다..> GChatProject@0.0.1 android> react-native run-androidinfo Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.Jetifier found 1134 file(s) to forward-jetify. Using 8 workers...info Starting JS server...info Launching emulator...error Failed to launch emulator. Reason: Emulator exited before boot..warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.info Installing the app...> Configure project :react-native-flipperWARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the gradle.properties file or use the new publishing DSL.WARNING:The specified Android SDK Build Tools version (30.0.2) is ignored, as it is below the minimum supported version (30.0.3) for Android Gradle Plugin 7.4.2.Android SDK Build Tools 30.0.3 will be used.To suppress this warning, remove "buildToolsVersion '30.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.> Task :app:checkDebugAarMetadata FAILEDDeprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.See https://docs.gradle.org/7.5/userguide/command_line_interface.html#sec:command_line_warnings10 actionable tasks: 2 executed, 8 up-to-dateFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:checkDebugAarMetadata'.> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.> Failed to transform react-native-0.71.0-rc.0-debug.aar (com.facebook.react:react-native:0.71.0-rc.0) to match attributes {artifactType=android-aar-metadata, com.android.build.api.attributes.BuildTypeAttr=debug, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.> Execution failed for JetifyTransform: C:\Users\asus\.gradle\caches\modules-2\files-2.1\com.facebook.react\react-native\0.71.0-rc.0\7a7f5a0af6ebd8eb94f7e5f7495e9d9684b4f543\react-native-0.71.0-rc.0-debug.aar.> Java heap space* 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.orgBUILD FAILED in 14serror Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:checkDebugAarMetadata'.> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.> Failed to transform react-native-0.71.0-rc.0-debug.aar (com.facebook.react:react-native:0.71.0-rc.0) to match attributes {artifactType=android-aar-metadata, com.android.build.api.attributes.BuildTypeAttr=debug, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.> Execution failed for JetifyTransform: C:\Users\asus\.gradle\caches\modules-2\files-2.1\com.facebook.react\react-native\0.71.0-rc.0\7a7f5a0af6ebd8eb94f7e5f7495e9d9684b4f543\react-native-0.71.0-rc.0-debug.aar.> Java heap space* 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.orgBUILD FAILED in 14sat makeError (C:\Users\asus\GChatProject\node_modules\execa\index.js:174:9)at C:\Users\asus\GChatProject\node_modules\execa\index.js:278:16at processTicksAndRejections (node:internal/process/task_queues:96:5)at async runOnAllDevices (C:\Users\asus\GChatProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)at async Command.handleAction (C:\Users\asus\GChatProject\node_modules\@react-native-community\cli\build\index.js:192:9)info Run CLI with --verbose flag for more details.네이버맵에서 얻은 clientId도 넣었는데.. 혹시 제가 빼먹은게 있을까요.. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.nomansland.gchatproject"> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> <application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/AppTheme"> <meta-data android:name="com.naver.maps.map.CLIENT_ID" android:value="{발급받은 ClientID}" /> <activity android:name=".MainActivity" android:label="@string/app_name"
-
미해결김영한의 실전 자바 - 기본편
캐스팅 관련 질문
암묵적 캐스팅 관련 질문이 있습니다. int x = 10 ;x /= 2.5 ;는 왜 오류를 일으키지 않나요? 사실 int x = 10 / 2.5 ; 랑 다를바가 없어보이는데, 전자는 오류가 발생 안하고 후자는 type 오류가 발생하는 것 같아서요
-
미해결김영한의 실전 자바 - 기본편
this 사용
constructor 에서의 this 쓰임 말고도 더 다른 쓰임들이 있더라구요. 빨간 밑줄 부분을 실행할때, 이 this 의 역활이 궁금합니다. 제가 그전에 배운 this 는 constructor 를 생성할때 instance variables 와 constructor 괄호 안 parameters 변수의 네이밍이 같을때 오류를 방지 하기 위해서 있는 걸로만 배웟는데, 이건 완전히 다른 this 의 역활인가요 ?
-
미해결[NarP Series] MVC 프레임워크는 내 손에 [나프2탄]
32강 spring legacy project
안녕하세요. 전자정부프레임워크 3.10.0 으로 수강 중 입니다. spring legacy project 에 들어가면 다음과 같이 spring MVC Project 템플릿이 보이지않아 문의드립니다.
-
해결됨코딩은 실전이다! - Git알못을 위한 깃린이코스(Git, Github 실습위주)
branch 활용, 실전편 (branch)질문있습니다.
1분 21초에서 같은파일에서 a 랑 c가 같은 위치에 저장되어있는데 충돌 안일어나나요? https://www.youtube.com/watch?v=Y8j7dfbc46M 위 영상에서 10분 51초에서는 같은 위치에서 코드 수정해주면 complite가 일어난다고 하는데요.
-
미해결김영한의 실전 자바 - 기본편
오버로딩
public MyClass(int x, double y){} { ㅇ// 구현 } public MyClass(double y, int x){ 이 두개는 overload 가 가능한가요? 원래 constructor 이던 method 이던 매개변수가 같으면 안된다고 알고 있는데, 저것도 같은 취급을 하는지 궁금합니다.} {ㅇㅇ
-
미해결리눅스 시스템 프로그래밍 - 이론과 실습
./stat 파일이름
./stat 파일이름을 넣어도 파일 사이즈가 96으로 고정, 출력도 ???만 뜨는데 혹시 왜 그런걸 까요?int main(int argc, char **argv){ struct stat statbuf; if (argc < 2) { printf("usage: %s filename\n", argv[0]); return -1; } if (stat(argv[1], &statbuf)) { printf("stat() fail\n"); return -1; } printf("filename: %s\n", argv[1]); printf("size: %ld\n", statbuf.st_size); if (S_ISDIR(statbuf.st_mode)) { printf("it is directory\n"); } else if (S_ISREG(statbuf.st_mode)) { printf("it is regular file\n"); } else { printf("???\n"); } return 0;}
-
미해결자바 코딩테스트 - it 대기업 유제
바둑대회 질문입니당
안녕하세요! 강의 잘 듣고있습니다! 바둑대회 문제 관련해서 제가 풀어낸 방식은 흑돌팀과 백돌팀 각각 인원을 세어주는 배열과 팀능력치를 계산하는 배열 두 개를 선언하고, 깊이가 다 다랐을 때 정답을 계속해서 초기화하는 방식을 사용했습니다. 예제 코드에서는 문제가 따로 생기진 않았는데 혹시 이런 방식의 풀이도 다른 문제를 접근하는게 큰 문제가 없을지 그리고 다른 입력에도 문제가 없을지 궁금합니다.package DFS; package DFS; import java.util.*; public class 바둑대회 { } class Solution6 { static int[] sum; static int[] teamCount; static int[][] cansArr; static int minNumber; static ArrayList<Integer>[] list; public static int solution(int[][] cans){ int answer; sum = new int[2]; teamCount = new int[2]; cansArr = cans; minNumber = Integer.MAX_VALUE; list = new ArrayList[2]; for (int i = 0; i < list.length; i++) { list[i] = new ArrayList<>(); } DFS(0); answer = minNumber; return answer; } public static void DFS(int lv){ if(lv == cansArr.length){ if(Math.abs(sum[0] - sum[1]) < minNumber){ minNumber = Math.abs(sum[0] - sum[1]); } return; } for (int i = 0; i < 2; i++){ if( teamCount[i] < cansArr.length/2 ){ sum[i] += cansArr[lv][i]; teamCount[i]++; DFS(lv+1); sum[i] -= cansArr[lv][i]; teamCount[i]--; } } } public static void main(String[] args){ Solution6 T = new Solution6(); System.out.println(T.solution(new int[][]{{87, 84}, {66, 78}, {94, 94}, {93, 87}, {72, 92}, {78, 63}})); System.out.println(T.solution(new int[][]{{10, 20}, {15, 25}, {35, 23}, {55, 20}})); System.out.println(T.solution(new int[][]{{11, 27}, {16, 21}, {35, 21}, {52, 21}, {25, 33},{25, 32}, {37, 59}, {33, 47}})); } }
-
해결됨실전! FastAPI 입문
router testcode 문의
router test code 에서 test_main.py 파일에 api.todo라고 main을 바꾸어 줬는데 import를 따로 안 시켜줘도 되나요 ?main.py는 from api import todo로 import 시키는데 test_main.py는 안 그래도 되는지 궁금합니다.
-
미해결[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
yarn install이 안 되는 문제가 있어 남겨봅니다.
Node.js v20.11.1NestJS 10.3.2npm 10.4.0 Yarn 4.1.0강의와 같이 폴더 생성 후 nest new . 로 생성했을 때 yarn install --silent 가 실패했습니다.모두 삭제 후 프로젝트를 만들 폴더에서 nest n cf_sns 로 시도했으나 동일하게 yarn install --silent 가 실패했습니다.nest 로 새 application을 생성 후 해당 폴더 내 yarn.lock 을 만들고 yarn install 을 실행한 후 yarn start:dev 를 실행할 수 있었습니다.저만 그런 건지 모르겠지만 혹시 몰라 기록을 남겨봅니다.---폴더 구성은 이렇게 되던데 최근 뭔가 달라진 걸까요? yarn을 처음 써봐서 잘 모르겠습니다. 🤔---https://yarnpkg.com/features/pnpPnP 때문인가 봅니다.---https://yarnpkg.com/getting-started/editor-sdksPnP 사용 시 VSCode에서 TypeScript가 제대로 작동하지 않는 문제는 이 문서를 통해 해결했습니다.
-
미해결모든 개발자를 위한 HTTP 웹 기본 지식
HTML FORM 사용 부분에서
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예[질문 내용]강의에서는회원 등록 폼을 /members/new로 get요청을 통해 회원 등록 폼 화면을 띄우고 회원 등록은 /members/new, /members에서 POST방식으로 데이터를 처리한다고 하셨는데회원 등록을 /members/new_process처럼 별도의 공간에서 데이터 처리를 하는거 안좋은 방식인가요?
-
미해결
연산자 파트 합격 불합격 판단하기 문제 코드
int main(void){int x = 0;int result = 0;printf("Enter score: ");scanf_s("%d", &x);result = x >= 80 ? printf("pass") : printf("fail");return 0;} 이렇게 써도 문제 없나요?
-
미해결카프카 완벽 가이드 - 코어편
vi 에서 wq!명령어가 안 먹혀요
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.이렇게 :wq!했는데도 불구하고 저장하고 나가기 기능이 안됩니다 ㅜㅜ
-
해결됨PM을 위한 데이터 리터러시(프로덕트 데이터 분석)
PA 도구와 BI 도구의 차이점에 대한 추가 질문
카일님 안녕하세요! 🙂 최근 시간이 날 때마다 강의를 들으며 질문이 많아졌네요ㅠㅠ 번거롭게 해드리지만 항상 답변해주시면 큰 도움이 되고 있습니다 😄 데이터 시각화 도구와 PA 도구와의 차이점에 대해 유저 로그 데이터는 PA 도구를, 데이터베이스 데이터는 데이터 시각화 도구를 사용한다고 이해했습니다.제가 궁금한 점은 데이터 종류에 따라 다른 시각화 도구를 사용하게 되는 것일까요? 즉, 데이터 로그 설계시 수집하기로한 데이터의 소스가 클라이언트면 주로 PA 도구로 분석, 데이터의 소스가 서버면 주로 BI 도구로 분석하게 되는 것일까요?앞서 데이터 로그 설계시 데이터의 Source는 클라이언트와 서버 두 가지 중 데이터 특성이나 데이터 정합성 등에 따라 결정된다고 학습했던 내용으로 인해 헷갈리게 되었습니다 😭
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
h2 데이터테이블이 안만들어져요
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]https://drive.google.com/file/d/1h-MGfbVOOqUMAtIrqo7Ys52FE4UnV9Am/view?usp=drive_linkMemberRepository를 실행했을 때 오류가 떠요어쩔 수 없이 뒷강의를 듣다가 앞으로 넘어오게 돼서 Order나 Item, Delivery 클래스들이 만들어져 있는데 이것들 때문일까요?
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
복사가 이상하게 됩니다. 어떻게 고쳐야할까요?
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]package hello.hellospring.repository; import hello.hellospring.domain.Member; import org.springframework.jdbc.datasource.DataSourceUtils; import javax.sql.DataSource; import java.sql.*; import java.util.ArrayList; import java.util.List; import java.util.Optional; public class JdbcMemberRepository implements MemberRepository { private final DataSource dataSource; public JdbcMemberRepository(DataSource dataSource) { this.dataSource = dataSource; } @Override public Member save(Member member) { String sql = "insert into member(name) values(?)"; Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { conn = getConnection(); pstmt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); pstmt.setString(1, member.getName()); pstmt.executeUpdate(); rs = pstmt.getGeneratedKeys(); if (rs.next()) { member.setId(rs.getLong(1)); } else { throw new SQLException("id 조회 실패"); } return member; } } } } catch (Exception e) { throw new IllegalStateException(e); finally { close(conn, pstmt, rs); @Override public Optional<Member> findById(Long id) { String sql = "select * from member where id = ?"; Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { conn = getConnection(); pstmt = conn.prepareStatement(sql); pstmt.setLong(1, id); rs = pstmt.executeQuery(); if(rs.next()) { Member member = new Member(); member.setId(rs.getLong("id")); member.setName(rs.getString("name")); return Optional.of(member); } else { return Optional.empty(); } } } } } catch (Exception e) { throw new IllegalStateException(e); finally { close(conn, pstmt, rs); @Override public List<Member> findAll() { String sql = "select * from member"; Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { conn = getConnection(); pstmt = conn.prepareStatement(sql); rs = pstmt.executeQuery(); List<Member> members = new ArrayList<>(); while(rs.next()) { Member member = new Member(); member.setId(rs.getLong("id")); member.setName(rs.getString("name")); members.add(member); } } } } } return members; catch (Exception e) { throw new IllegalStateException(e); finally { close(conn, pstmt, rs); @Override public Optional<Member> findByName(String name) { String sql = "select * from member where name = ?"; Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { conn = getConnection(); pstmt = conn.prepareStatement(sql); pstmt.setString(1, name); rs = pstmt.executeQuery(); if(rs.next()) { Member member = new Member(); member.setId(rs.getLong("id")); member.setName(rs.getString("name")); return Optional.of(member); } return Optional.empty(); } } } catch (Exception e) { throw new IllegalStateException(e); finally { close(conn, pstmt, rs); } private Connection getConnection() { return DataSourceUtils.getConnection(dataSource); } private void close(Connection conn, PreparedStatement pstmt, ResultSet rs) { try { if (rs != null) { rs.close(); } } catch (SQLException e) { e.printStackTrace(); } try { if (pstmt != null) { pstmt.close(); } } catch (SQLException e) { e.printStackTrace(); } try { if (conn != null) { close(conn); } } catch (SQLException e) { e.printStackTrace(); } } private void close(Connection conn) throws SQLException { DataSourceUtils.releaseConnection(conn, dataSource); } }이런식으로 복사됩니다. 매번 이래서 크롬으로 변경해서 복사해도 똑같네요..
-
미해결스프링 시큐리티 OAuth2
Token Decoder
저는 업무 환경 상 버전이 다르게 진행하고 있고,org.springframework.boot version "3.2.1"security version "6.2.1"개념과 과정을 강의를 통해 도움 받고 있습니다.궁금한 것은 Authorization Server 에서 강사님이 설정하신 바와 같이 JwtSource 설정을 넣으니, Resource Server 에서 다른 알고리즘으로 파싱이 안된다는 에러가 나더라구요.@Bean public JWKSource<SecurityContext> jwkSource() throws NoSuchAlgorithmException { RSAKey rsaKey = generateRsa(); JWKSet jwkSet = new JWKSet(rsaKey); return (jwkSelector, context) -> jwkSele ctor.select(jwkSet); }[DefaultJWTProcessor]new BadJOSEException("Signed JWT rejected: Another algorithm expected, or no matching key(s) found"); Authorization server 에서 Token발행 과정을 디버깅하면DelegatingOAuth2TokenGenerator > JwtGenerator에서 alg : RS256, encoder 는 NimbusJwtEncoder 로 토큰이 저장됩니다. Resource 서버에서 NimbusJwtDecoder 를 통해 진행되기는 하나 header key 가 RSA 로 들어오던데요. Authorization server 의 jwkSource 설정을 모두 주석처리하니, 더 이상 키 불일치 에러는 발생하지 않더라구요. 버전 상의 문제일지 양쪽 서버에 뭔가 다른 설정이 필요했을지 궁금해서 문의 남깁니다.
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
피그마 데브모드
피그마 로그인하고, 데브모드로 변경되지 않아 CSS 속성을 확인할 수 없어요
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
6-I 지문 문제
http://boj.kr/ea0856e69f854bb9afee8490ed73794d 코드의 질문은 아닙니다.. 지문의 (하지만 하나의 파닭에는 하나 이상의 파가 들어가면 안 된다.) 라는 부분을 읽고 파는 무조건 나뉘어져야 한다. 라고 생각하고 조건을if(temp>mid)으로 달았었거든요 어디서 틀렸나 강의 봤는데if(temp>=mid) 였더라구요이렇게 되면 파를 통째로 사용하게 되는 경우도 생겨 오답인 것이 아닌가요?코드 질문은 아니여서 올릴까 말까 하다가.. 찜찜해서 질문드립니다!
-
미해결신입사원에게 들려주는 - MCU SW 직무 기초 개념완성
어셈블리어
어셈블리어와 기계어는 서로 다른거로 알고있는데 같은 말이라고 강의에 나와서, 혹시 왜 같은건지 알 수 있을까요?제가 알기론, cpu가 이해하고 읽을 수 있는 건 바이너리 코드인데 이 바이너리 코드를 사람이 쉽게 사용하지 못해서 나온것이 어셈블리어라고 알고 있습니다.