我的应用程序崩溃并出现错误"资源未找到",我已将所有资源放在默认文件夹中并清理+重建项目几次但错误仍然相同。实际上缺少什么资源?这有什么可能的错误。请帮忙 !! 下面是导致资源错误的类的代码。 `
package com.example.farhan.chitchat;
/**
* Created by Farhan on 0028, November 28, 2017.
*/
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import com.google.firebase.auth.FirebaseAuth;
public class SplashActivity extends AppCompatActivity {
private static final long SPLASH_TIME_MS = 2000;
private Handler mHandler;
private Runnable mRunnable;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
mHandler = new Handler();
mRunnable = new Runnable() {
@Override
public void run() {
// check if user is already logged in or not
if (FirebaseAuth.getInstance().getCurrentUser() != null) {
// if logged in redirect the user to user listing activity
UserListingActivity.startActivity(SplashActivity.this);
} else {
// otherwise redirect the user to login activity
LoginActivity.startIntent(SplashActivity.this);
}
finish();
}
};
mHandler.postDelayed(mRunnable, SPLASH_TIME_MS);
}
/*@Override
protected void onPause() {
super.onPause();
mHandler.removeCallbacks(mRunnable);
}
@Override
protected void onResume() {
super.onResume();
mHandler.postDelayed(mRunnable, SPLASH_TIME_MS);
}*/
}
11-29 02:15:24.117 3175-3175/com.example.farhan.chitchat E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.farhan.chitchat, PID: 3175
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.farhan.chitchat/com.example.farhan.chitchat.SplashActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f07005b
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
答案 0 :(得分:0)
尝试查看R文件中哪个元素对应于0x7f07005b。