我已经阅读了很多有关此错误的信息,但找不到解决方案。
热重载不起作用,我有一个错误:
EventSource 的响应具有不是“text/event-stream”的 MIME 类型(“text/html”)。中止连接。
"webpack": "^2.5.1",
"webpack-dev-middleware": "^1.8.4",
"webpack-hot-middleware": "^2.22.1",
Run Code Online (Sandbox Code Playgroud)
我找到了https://github.com/webpack-contrib/webpack-hot-middleware/issues/26但这对我没有帮助
你知道如何摆脱这个错误吗?
我的 webpack.config.js
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const project = require('../project.config')
const inProject = path.resolve.bind(path, project.basePath)
const inProjectSrc = (file) => inProject(project.srcDir, file)
const __DEV__ = project.env === 'development'
const __TEST__ = project.env === 'test'
const __PROD__ = project.env === 'production'
const config = {
entry: {
normalize: [
inProjectSrc('normalize'),
],
main: [ …Run Code Online (Sandbox Code Playgroud) 我使用这个存储库制作了slidinguppanel https://github.com/dlukashev/AndroidSlidingUpPanel-foursquare-map-demo
但是,它包含一个未在任何地方覆盖的错误.
当我触摸任何地方扩展面板(listview)效果很好,但是当我试图通过按住列表视图的顶部(屏幕2上的蓝线)来展开它时,面板隐藏在地图下(framelayout)(screen3)
怎么有可能这个蓝线隐藏面板在mapfragment和listview的其余部分扩展得很好?
有什么想法吗?请给我一个提示如何修复它?
请看屏幕:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<org.sothree.slidinguppanel.SlidingUpPanelLayout
android:id="@+id/slidingLayout"
android:gravity="bottom"
app:shadowHeight="0dp"
app:paralaxOffset="@dimen/paralax_offset"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<FrameLayout
android:gravity="top"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/button">
<RelativeLayout
android:id="@+id/mapContainer"
android:layout_width="fill_parent"
android:layout_height="497dp"/>
</FrameLayout>
<RelativeLayout
android:id="@+id/slidingContainer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/button">
<View
android:id="@+id/transparentView"
android:visibility="gone"
android:layout_width="fill_parent"
android:layout_height="@dimen/map_height"
android:layout_alignParentTop="true"/>
<ListView
android:id="@+id/listView1"
android:cacheColorHint="@android:color/white"
android:drawSelectorOnTop="true"
android:dividerHeight="@dimen/divider_height"
android:divider="@android:color/darker_gray"
android:background="@android:color/transparent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/transparentView"
android:smoothScrollbar="true"
android:layout_marginTop="0dp"/>
</RelativeLayout>
</org.sothree.slidinguppanel.SlidingUpPanelLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud) 我有 gatsby 博客,在我创建新帖子并构建静态文件后,将它们上传到我的主机上,每个用户都必须在我的博客上进行硬刷新才能看到更改。
上传新版本后如何在下次访问时自动刷新?
我想发送相机意图拍摄的照片.
当我启动一个Intent时,相机正在显示,但方法postImage不会等到拍照.PostImage只是在启动意图后加载.
如何在拍照后加载postImage?
要么
如何检测照片是否拍摄?
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
mMediaUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);
if(mMediaUri == null){
Toast.makeText(MainActivity.this, "Problem!", Toast.LENGTH_LONG).show();
}
else {
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, mMediaUri);
startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);
postImage("mail", mMediaUri.getPath());
}
}
Run Code Online (Sandbox Code Playgroud)
我对react-router-dom v4有问题
当我单击App.js中的“主页/联系人”链接时,它运行良好,请重定向到正确的路径。
但是,当我单击NavBar链接(NavLink =“ =”)时,它会更改路径,但不会呈现新组件
如何强制NavLink单击以重新呈现新组件?
App.js
export const App = () => {
return(
<div className="App">
<NavBar />
<div className='text-center'>
<div className='children'>
<Router>
<div className="container">
<Link to="/">Home</Link>
<Link to= "/contact">Contact</Link>
<Link to= "/terms">Terms</Link>
<Route exact path= "/" component={Home} />
<Route path= "/contact" component={Contact} />
<Route path= "/terms" component={Terms} />
</div>
</Router>
</div>
<Footer />
</div>
</div>
);}
export default App;
Run Code Online (Sandbox Code Playgroud)
NavBar.js
class NavBar extends React.Component {
render () {
return (
<nav className="navbar navbar-default horizontal-navbar">
<a className="navbar-brand" href="#"> …Run Code Online (Sandbox Code Playgroud) reactjs ×4
android ×2
javascript ×2
blogs ×1
gatsby ×1
hosting ×1
react-router ×1
react-table ×1
routing ×1
slidingmenu ×1
url-routing ×1
webpack ×1
webpack-hmr ×1