---
title: "Android 无法加载fragment的问题"
author: "zhouxiaoli521"
date: "2013-06-17T14:42:03Z"
tags: []
categories: ["移动开发"]
slug: "android-fragment"
draft: false
lastmod: "2013-06-17T14:42:03Z"
id: 1888150
url: "https://mycoding.iteye.com/blog/1888150"
---

在项目中继承了fragment 重写了构造函数

```
make sure class name exists, is public, and has an empty constructor that is public
```

 加载过程中报错

去表构造就好了

[http://stackoverflow.com/questions/10450348/do-fragments-really-need-an-empty-constructor](http://stackoverflow.com/questions/10450348/do-fragments-really-need-an-empty-constructor)

[http://stackoverflow.com/questions/7016632/unable-to-instantiate-fragment](http://stackoverflow.com/questions/7016632/unable-to-instantiate-fragment)