问题
AdMob has been working in my Android app for a while now until recently when I tried to update. I tried to update the app itself but I saw that it kept crashing.
I tried debugging what happened. The app seems to work once I removed the ads. I've now published the app without any ads and it works fine. Any reasons why it may have all of a sudden stopped working? I haven't changed any of the code before. The only code I changed were additional tips in my Relationship tips app.
回答1:
Make sure your jar files are checked in Properties --> Java Build Path --> Order and Export.
回答2:
You didn't post error so I am just guessing, admob had a bug on android os 2.1+, and I had a admob crashing issue, I found a suggestion to not calling adview.destroy on OnDestroy because it causes crashing.
If you have adview.destroy() on your onDestroy override, just remark it and try.
@Override
protected void onDestroy() {
super.onDestroy();
// bug at sdk, no need to call
//adView.destroy();
}
来源:https://stackoverflow.com/questions/10155901/how-do-i-fix-admob-crashing-my-android-app