你好我在Android编程中的新手,我学习使用holloeverywhere为我的应用程序,但我在使用GCM实现时出错..如何解决? 。 sory for my english
定义holoeverywhere
import org.holoeverywhere.app.Activity;
import org.holoeverywhere.app.Application;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.text.Editable;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.inputmethod.InputMethodManager;
import org.holoeverywhere.widget.Button;
import org.holoeverywhere.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import org.holoeverywhere.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import org.holoeverywhere.widget.Toast;
import android.text.TextWatcher;
import com.droidersuin.project.R;
import com.droidersuin.project.dashboard.Dashboard;
import com.droidersuin.project.database_content.DatabaseHandler;
import com.droidersuin.project.setting.SettingApp;
import com.droidersuin.project.side_menu_scroll.ScrollerLinearLayout;
import com.google.android.gcm.GCMRegistrar;
public class LoginActivity extends Activity {
}
这是我的代码
if(user.trim().length() > 0 && password.trim().length() > 0){
GCMRegistrar.checkDevice(getApplicationContext());
GCMRegistrar.checkManifest(getApplicationContext());
GCMid = GCMRegistrar.getRegistrationId(getApplicationContext());
var_cek_idgcm=0;
cek_idgcm();
}else{
// user doen't filled that data
// ask him to fill the form
alert.showAlertDialog(LoginActivity.this, "Login Error!", "Please enter your details", false);
btn_enable();
}
错误 GCMid = GCMRegistrar.getRegistrationId(getApplicationContext());
12-03 06:32:31.822: E/AndroidRuntime(749): FATAL EXCEPTION: main
12-03 06:32:31.822: E/AndroidRuntime(749): java.lang.UnsatisfiedLinkError: HoloEverywhere: PreferenceFramework not found
12-03 06:32:31.822: E/AndroidRuntime(749): at org.holoeverywhere.preference.PreferenceManagerHelper.checkImpl(PreferenceManagerHelper.java:38)
12-03 06:32:31.822: E/AndroidRuntime(749): at org.holoeverywhere.preference.PreferenceManagerHelper.wrap(PreferenceManagerHelper.java:59)
12-03 06:32:31.822: E/AndroidRuntime(749): at org.holoeverywhere.preference.PreferenceManagerHelper.wrap(PreferenceManagerHelper.java:65)
12-03 06:32:31.822: E/AndroidRuntime(749): at org.holoeverywhere.app.Application.getSharedPreferences(Application.java:84)
12-03 06:32:31.822: E/AndroidRuntime(749): at org.holoeverywhere.app.Application.getSharedPreferences(Application.java:1)
12-03 06:32:31.822: E/AndroidRuntime(749): at com.google.android.gcm.GCMRegistrar.getGCMPreferences(GCMRegistrar.java:415)
12-03 06:32:31.822: E/AndroidRuntime(749): at com.google.android.gcm.GCMRegistrar.getRegistrationId(GCMRegistrar.java:289)
12-03 06:32:31.822: E/AndroidRuntime(749): at com.droidersuin.project.LoginActivity$3.onClick(LoginActivity.java:222)
12-03 06:32:31.822: E/AndroidRuntime(749): at android.view.View.performClick(View.java:2408)
12-03 06:32:31.822: E/AndroidRuntime(749): at android.view.View$PerformClick.run(View.java:8816)
12-03 06:32:31.822: E/AndroidRuntime(749): at android.os.Handler.handleCallback(Handler.java:587)
12-03 06:32:31.822: E/AndroidRuntime(749): at android.os.Handler.dispatchMessage(Handler.java:92)
12-03 06:32:31.822: E/AndroidRuntime(749): at android.os.Looper.loop(Looper.java:123)
12-03 06:32:31.822: E/AndroidRuntime(749): at android.app.ActivityThread.main(ActivityThread.java:4627)
12-03 06:32:31.822: E/AndroidRuntime(749): at java.lang.reflect.Method.invokeNative(Native Method)
12-03 06:32:31.822: E/AndroidRuntime(749): at java.lang.reflect.Method.invoke(Method.java:521)
12-03 06:32:31.822: E/AndroidRuntime(749): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-03 06:32:31.822: E/AndroidRuntime(749): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-03 06:32:31.822: E/AndroidRuntime(749): at dalvik.system.NativeStart.main(Native Method)