Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更改MainActivity路径 #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

更改MainActivity路径 #12

wants to merge 1 commit into from

Conversation

lanzf
Copy link

@lanzf lanzf commented Sep 29, 2015

更新MainActivity路径

@race604
Copy link
Owner

race604 commented Sep 29, 2015

谢谢你,为了更好的组织的 Java 的代码,我当时修改了包名: commit f5a60b6 ,确实造成了一些困扰,例如 #5

@willwee
Copy link

willwee commented Dec 10, 2015

您好大侠,帮我看下为何我在运行react-native start的时候有报错,找不到yeoman-environment,帮忙看下,甚是感谢,初学还望多多指教。
D:\react\zhihudaily>npm install

D:\react\zhihudaily>react-native start
module.js:339
throw err;
^

Error: Cannot find module 'yeoman-environment'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (D:\react\zhihudaily\node_modules\react-native\local-cli\generate-androi
d.js:5:14)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)

@zhll912
Copy link

zhll912 commented Dec 25, 2015

这个问题到底如何解决的,怎么我今天down的代码还有这个错误?

@huangyk
Copy link

huangyk commented Nov 4, 2016

不知道怎么搞得,我是android4.4的环境,
bundle: Created ReactPackager uncaught error Error: SyntaxError: D:/CrmWorkSpace /work/ZhiHuDaily-React-Native-master/node_modules/react-native-viewpager/ViewPag er.js: Type annotations must come before default assignments, e.g. instead ofa
ge = 25: numberuseage: number = 25` (211:40)
209 | },
210 |

211 | _getPage(pageIdx: number, loop = false: boolean) {
| ^
212 | var dataSource = this.props.dataSource;
213 | var pageID = dataSource.pageIdentities[pageIdx];
214 | return (
at Parser.pp$5.raise (D:\CrmWorkSpace\work\ZhiHuDaily-React-Native-master\no
de_modules\babylon\lib\index.js:4215:13)
at Parser.parseMaybeDefault (D:\CrmWorkSpace\work\ZhiHuDaily-React-Native-ma
ster\node_modules\babylon\lib\index.js:5474:14)
at Parser.pp$2.parseBindingList (D:\CrmWorkSpace\work\ZhiHuDaily-React-Nativ
e-master\node_modules\babylon\lib\index.js:2926:22)
at Parser.pp$3.parseMethod (D:\CrmWorkSpace\work\ZhiHuDaily-React-Native-mas
ter\node_modules\babylon\lib\index.js:3944:22)
at Parser.pp$3.parseObjPropValue (D:\CrmWorkSpace\work\ZhiHuDaily-React-Nati
ve-master\node_modules\babylon\lib\index.js:3865:10)
at Parser.parseObjPropValue (D:\CrmWorkSpace\work\ZhiHuDaily-React-Native-ma
ster\node_modules\babylon\lib\index.js:5443:13)
at Parser.pp$3.parseObj (D:\CrmWorkSpace\work\ZhiHuDaily-React-Native-master
\node_modules\babylon\lib\index.js:3839:10)
at Parser.pp$3.parseExprAtom (D:\CrmWorkSpace\work\ZhiHuDaily-React-Native-m
aster\node_modules\babylon\lib\index.js:3529:19)
at Parser.parseExprAtom (D:\CrmWorkSpace\work\ZhiHuDaily-React-Native-master
\node_modules\babylon\lib\index.js:6307:22)
at Parser.pp$3.parseExprSubscripts (D:\CrmWorkSpace\work\ZhiHuDaily-React-Na
tive-master\node_modules\babylon\lib\index.js:3305:19)
See logs C:\Users\ADMINI~1\AppData\Local\Temp\react-packager.log
at SocketClient._handleMessage (D:/CrmWorkSpace/work/ZhiHuDaily-React-Native
-master/node_modules/react-native/packager/react-packager/src/SocketInterface/So
cketClient.js:13 9
:23)
at BunserBuf. (D:/CrmWorkSpace/work/ZhiHuDaily-React-Native-maste
r/node_modules/react-native/packager/react-packager/src/SocketInterface/SocketCl
ient.js:53:42)
at emitOne (events.js:96:13)
at BunserBuf.emit (events.js:188:7)
at BunserBuf.process (D:\CrmWorkSpace\work\ZhiHuDaily-React-Native-master\no
de_modules\bser\index.js:289:10)
at D:\CrmWorkSpace\work\ZhiHuDaily-React-Native-master\node_modules\bser\ind
ex.js:244:12
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
:
app:bundleDebugJsAndAssets F
AILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:bundleDebugJsAndAssets'.

    Process 'command 'cmd'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug
    option to get more log output.

BUILD FAILED

Total time: 19.37 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html`

@shenshizhong
Copy link

@huangyk 我也是这个问题

@shenshizhong
Copy link

@huangyk 我已经解决了.
1、找到ViewPager.js 的目录,用文本编辑器打开这个文件,例如我的 D:\rnwork\ZhiHuDaily-React-Native-master\node_modules\react-native-viewpager
2、找到_getPage 这行,修改后面部分,你也可以粘贴我的,再运行即可 _getPage(pageIdx: number, loop: boolean = false) {
3、不清楚,可参考这个地址。https://github.com/race604/react-native-viewpager/pull/97/files

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants