Yêu cầu thg 6 25, 2019 3:58 SA 175 0 2
  • 175 0 2
0

React native android building app error

Chia sẻ
  • 175 0 2

Help me plz ! I'm newbie in react native android learner. When i try to build my app this is what i got:

Error: EPERM: operation not permitted, lstat 'F:\react\templatephoto\android
app\build\generated\not_namespaced_r_class_sources\devKernelDebug\processDevKernelDebugResources\r\android\arch\core\R.java'
Emitted 'error' event at:
at NodeWatcher. (F:\react\templatephoto\node_modules\sane\src\node_watcher.js:306:14)
at F:\react\templatephoto\node_modules\graceful-fs\polyfills.js:282:31
at FSReqCallback.oncomplete (fs.js:165:21) {
errno: -4048,
code: 'EPERM',
syscall: 'lstat',
path: 'F:\react\templatephoto\android\app\build\generated\not_namespaced_r_class_sources\devKernelDebug\processDevKernelDebugResources\r\android\arch\core\R.java'
}

There are steps to build this app in to emulator device:

npm install
npm start

Open xcode or android studio build native project

How can i fix it ?

thg 6 25, 2019 4:03 SA

đầu tiên là không nhất thiết phải viết english đâu bạn 😃)) tiếp theo bạn chụp giúp mình screen bạn run như nào? chứ bạn paste đoạn này vào thì không ai nhìn ra mà giúp được đâu =)))

thg 6 25, 2019 5:06 SA

@longnk1301 haha lần đầu đăng hỏi nên không biết :v npmrun.png đây là những gì terminal hiển thị khi mình làm theo các bước trên file readme

thg 6 25, 2019 5:07 SA
thg 6 25, 2019 5:11 SA
thg 6 25, 2019 5:24 SA

@ToraraBD98 ?? readme nào bạn nhỉ? trên repo á bạn? https://github.com/facebook/react-native

bạn chạy lại rồi chụp giúp mình screen nhá =))

thg 6 25, 2019 5:27 SA

@ToraraBD98 bạn tham khảo bài này của mình nhá, bug ở đâu thì hỏi lại mình https://viblo.asia/p/hay-bat-dau-voi-react-native-maGK7jQD5j2

thg 6 25, 2019 7:10 SA

@longnk1301 thanks mình sẽ đọc

2 CÂU TRẢ LỜI


Đã trả lời thg 6 25, 2019 5:52 SA
+2

chả biết lỗi ở đâu nhưng có thể dùng thử những cách này:

-xóa build, xóa cache, build lại.

-xóa node_modules, xóa cache, npm install, build lại.

Chia sẻ
Đã trả lời thg 12 25, 2019 12:08 CH
0

lỗi permission kìa bạn :v

có vẻ bạn đang chạy trên windows, hãy thử bật vscode bằng quyền admin (chuột phải -> run as administrator)

còn nếu linux thì cứ nã sudo vào là hết lằng nhằng =))

chúc may mắn!

Chia sẻ
Viblo
Hãy đăng ký một tài khoản Viblo để nhận được nhiều bài viết thú vị hơn.
Đăng kí