Android Studio - 非法字符8204错误

时间:2015-06-08 20:41:56

标签: java android android-intent android-fragments android-studio

出于某种原因,在重建我的项目后,我收到了非法的字符错误,但我的代码中的任何内容都没有用红色加下划线。有人可以告诉我有什么问题以及如何解决它?

错误

illegal character: \8204

WCBankActivity.java

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.ActionBarActivity;

public class WCBankActivity extends ActionBarActivity {

    public final static String EXTRA_MESSAGE = "Station_key";

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fragment_wc_bank);

        if (savedInstanceState == null) {
            Intent intent = getIntent();
            String station = intent.getStringExtra(WCBankActivity.EXTRA_MESSAGE);

            FragmentWCBank newFragment = new FragmentWCBank();
            FragmentTransaction transaction = this.getSupportFragmentManager().beginTransaction();‌
            transaction.replace(R.id.detail_container, newFragment);
            transaction.commit();
        }
    }
}

1

2 个答案:

答案 0 :(得分:21)

尝试更改编码,请参阅图片:

enter image description here

答案 1 :(得分:1)

这是与BOM(字节顺序标记)字符相关的问题。 Eclipse不允许使用此字符。

mb <- mob(formula = Surv(time, cens) ~ horTh + pnodes | age + tsize + tgrade + progrec + estrec + menostat, 
  data = GBSG2, fit = cox)
mb
## Model-based recursive partitioning (cox)
## 
## Model formula:
## Surv(time, cens) ~ horTh + pnodes | age + tsize + tgrade + progrec + 
##     estrec + menostat
## 
## Fitted party:
## [1] root: n = 686
##       xhorThyes     xpnodes 
##     -0.35701115  0.05768026  
## 
## Number of inner nodes:    0
## Number of terminal nodes: 1
## Number of parameters per node: 2
## Objective function: 1758.86