虽然我尝试了其他关于这个问题的答案,但是无法解决.发件人ID正确,添加权限,API密钥为true.
我使用这篇文章来创建项目:http: //developer.android.com/guide/google/gcm/gs.html#server-app
GCMRegistrar.checkDevice(this);
GCMRegistrar.checkManifest(this);
String regId = GCMRegistrar.getRegistrationId(this);
if (regId.equals("")) {
GCMRegistrar.register(this, SENDER_ID);
regId = GCMRegistrar.getRegistrationId(this);
} else {
Log.v(TAG, "Already registered");
}
String did = getDeviceID();
Run Code Online (Sandbox Code Playgroud)
它返回空字符串.
我想从apk获取源代码并使用此解决方案有没有办法从APK文件中获取源代码?
我尝试将dex文件转换为jar并使用dex2jar; 但是cmd无法识别此命令.
dex2jar classes.dex
Run Code Online (Sandbox Code Playgroud)
"dex2jar不被视为内部或外部命令"
是dex2jar已被弃用?
我可以用什么来将dex转换为jar?
我正在尝试使用GCM向手机发送消息.我收到一条消息id = 0 ...响应,但我的手机没有显示任何消息.有没有办法检查消息的状态(发送,等待等)
我知道这是一个基本问题,但我找不到问题.我尝试使用rawQuery获取一些列.
SQLiteDatabase db=database.getReadableDatabase();
try
{
String sql="SELECT * FROM CAR WHERE name = ";
Cursor crs = db.rawQuery(sql+"5P", null);
}
Run Code Online (Sandbox Code Playgroud)
我总是得到同样的例外.
android.database.sqlite.SQLiteException: **unrecognized token**: "5P": , while compiling: SELECT * FROM CAR WHERE name = 5P
Run Code Online (Sandbox Code Playgroud)
我在CAR桌上有5P,我确定因为我使用了其他查询.
我正在使用Windows窗体应用程序将数据导出到Excel.
应用程序是x64和x86构建的.
因此,必须安装两个版本的Microsoft Access数据库引擎才能在同一台计算机上运行该应用程序.
首先安装AccessDatabaseEngine.exe,并且AccessDatabaseEngine_x64.exe被动安装.
x64版本的应用程序正在运行
但x86版本正在增加
SEHException: "External component has thrown an exception."
at System.Data.Common.UnsafeNativeMethods.IDBInitializeInitialize.Invoke(IntPtr pThis)
at System.Data.OleDb.DataSourceWrapper.InitializeAndCreateSession(OleDbConnectionString constr, SessionWrapper& sessionWrapper)
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
Run Code Online (Sandbox Code Playgroud)
代码部分如下;
var accessConnection = new OleDbConnection(connectionString);
accessConnection.Open();
Run Code Online (Sandbox Code Playgroud)
而ConnectionString是
Provider=Microsoft.ACE.OLEDB.12.0;Data Source="C:\Users\Me\Desktop\ExportTest.xls";Extended Properties="Excel 8.0;HDR=Yes";
Run Code Online (Sandbox Code Playgroud)
我该如何解决?
我尝试实现GCM,但我得到一个错误,我试图找到日志互联网,但我不能.当代码来到这些行时,我在logcat上遇到错误
GCMRegistrar.checkDevice(this);
GCMRegistrar.checkManifest(this);
Run Code Online (Sandbox Code Playgroud)
这个logcat输出是什么意思?
09-11 11:14:25.132: W/dalvikvm(11946): threadid=11: thread exiting with uncaught exception (group=0x40aac210)
09-11 11:14:25.142: E/AndroidRuntime(11946): FATAL EXCEPTION: IntentService[ManagePushCommunicationService]
09-11 11:14:25.142: E/AndroidRuntime(11946): java.lang.IllegalStateException: Application does not define permission com.example.push.permission.C2D_MESSAGE
09-11 11:14:25.142: E/AndroidRuntime(11946): at com.google.android.gcm.GCMRegistrar.checkManifest(GCMRegistrar.java:135)
09-11 11:14:25.142: E/AndroidRuntime(11946): at com.example.push.services.ManagePushCommunicationService.startJob(ManagePushCommunicationService.java:156)
09-11 11:14:25.142: E/AndroidRuntime(11946): at com.example.push.services.ManagePushCommunicationService.onHandleIntent(ManagePushCommunicationService.java:85)
09-11 11:14:25.142: E/AndroidRuntime(11946): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
09-11 11:14:25.142: E/AndroidRuntime(11946): at android.os.Handler.dispatchMessage(Handler.java:99)
09-11 11:14:25.142: E/AndroidRuntime(11946): at android.os.Looper.loop(Looper.java:137)
09-11 11:14:25.142: E/AndroidRuntime(11946): at android.os.HandlerThread.run(HandlerThread.java:60)
09-11 11:19:25.162: I/Process(11946): Sending signal. PID: 11946 SIG: 9
Run Code Online (Sandbox Code Playgroud) 有类似的问题,但我找不到这个特定的情况:
计算机A - Linux构建服务器
计算机B - Linux调试服务器
计算机C - Windows,我的本地comp.
我有ac/c ++项目-eclipse cdt.我可以在计算机C上编辑源文件,在计算机A上构建并传输到计算机B,然后通过我的本地项目进行调试吗?如何使用Eclipse的现有工具/配置执行此操作?
我想在menustrip和menuStrip右边的窗体之间留一个间隙。我使用了autosize = false和新的size属性,更改了menustrip的高度,但未更改width。Menustrip的宽度与窗体的宽度相同。
menuStrip2.AutoSize = false;
menuStrip2.Size = new Size(50, 90);
Run Code Online (Sandbox Code Playgroud)
我也无法从设计->属性->大小更改。
我仅在menustrip的右侧到窗体的左侧之间创建了一个间隙。