我得到这个错误我不知道为什么。帮助我给它一些资源错误,但我只是复制项目从网络工作100%罚款当我在Android Studio中创建新项目,只是代码粘贴所有数据,它给我这个错误,我明白它是什么。任何人都可以告诉我??
我的logcat屏幕截图http://i.stack.imgur.com/lQ6CL.jpg
import com.google.analytics.tracking.android.EasyTracker;
import android.content.res.Configuration;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.widget.Toast;
public class BaseActivity extends FragmentActivity {
public static Typeface sRobotoBlack;
public static Typeface sRobotoBlackItalic;
public static Typeface sRobotoLight;
public static Typeface sRobotoLightItalic;
public static Typeface sRobotoThin;
private Toast mToast;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initTypefaces();
}
@Override
public void onStart() {
super.onStart();
EasyTracker.getInstance(this).activityStart(this);
}
@Override
public void onStop() {
super.onStop();
EasyTracker.getInstance(this).activityStop(this);
}
@Override
protected void onDestroy() {
super.onDestroy();
if (mToast != null) {
mToast.cancel();
}
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
public void makeToast(int resId) {
makeToast(getString(resId));
}
public void makeToast(String text) {
if (mToast == null) {
mToast = Toast.makeText(this, text, Toast.LENGTH_LONG);
} else {
mToast.setText(text);
}
mToast.show();
}
private void initTypefaces() {
if (sRobotoBlack == null) {
sRobotoBlack = Typeface.createFromAsset(getAssets(),
"fonts/Roboto-Black.ttf");
}
if (sRobotoBlackItalic == null) {
sRobotoBlackItalic = Typeface.createFromAsset(getAssets(),
"fonts/Roboto-BlackItalic.ttf");
}
if (sRobotoLight == null) {
sRobotoLight = Typeface.createFromAsset(getAssets(),
"fonts/Roboto-Light.ttf");
}
if (sRobotoLightItalic == null) {
sRobotoLightItalic = Typeface.createFromAsset(getAssets(),
"fonts/Roboto-LightItalic.ttf");
}
if (sRobotoThin == null) {
sRobotoThin = Typeface.createFromAsset(getAssets(),
"fonts/Roboto-Thin.ttf");
}
}
}
答案 0 :(得分:0)
将string.xml
下的旧string.xml
复制到值文件夹