E/MS_RegisterService:获取GCM令牌java.io.IOException:超时异常

E/MS_RegisterService:获取GCM令牌java.io.IOException:超时异常,java,android,Java,Android,android开发新手。 我在尝试测试“历史记录”活动时遇到此问题 不知道该怎么处理它。 我搜索了一些答案,但它们都超出了我的理解范围,因此我不得不将我的答案张贴出来。 我在logcat中也不断遇到这个错误: “E/memtrack:无法加载memtrack模块” 也不知道如何解决它 提前谢谢你们 这是我的听众 findViewById(R.id.view_history_button).setOnClickListener(new View.OnClickListener(){

android开发新手。
我在尝试测试“历史记录”活动时遇到此问题
不知道该怎么处理它。
我搜索了一些答案,但它们都超出了我的理解范围,因此我不得不将我的答案张贴出来。
我在logcat中也不断遇到这个错误:
“E/memtrack:无法加载memtrack模块”
也不知道如何解决它
提前谢谢你们

这是我的听众

findViewById(R.id.view_history_button).setOnClickListener(new View.OnClickListener(){
        @Override
        public void onClick(View view) {
            Intent toHistory=new Intent(main,history.class);
            main.startActivity(toHistory);
        }
    } );
这是“历史”活动的代码

导入android.database.Cursor;
导入android.database.sqlite.SQLiteDatabase;
导入android.os.Bundle;
导入android.support.v7.app.AppActivity;
导入android.widget.ListView;
导入android.widget.simpledapter;
导入java.util.ArrayList;
导入java.util.HashMap;
导入java.util.List;
导入java.util.Map;
公共类历史记录扩展了AppCompative活动{
public ListView ListView=null;
私有列表=新的ArrayList();
私有simpledapter simpledapter=null;
私有字符串日期;
私有字符串目标;
私有字符串项;
@凌驾
创建时受保护的void(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_history);
listView=(listView)findViewById(R.id.listView);
simpleAdapter=新的simpleAdapter(此,getdata(),R.layout.listview\u内容,
新字符串[]{“日期”、“目标”、“项”},新int[]{R.id.time,R.id.name,R.id.item});
setAdapter(simpleAdapter);
}
私有列表getdata(){
DBHelper DBHelper=新的DBHelper(getApplicationContext(),
“交货信息”,空,1);
SQLiteDatabase db=dbHelper.getReadableDatabase();
Cursor Cursor=db.rawQuery(“从信息表中选择*”,null);
if(cursor.moveToFirst()){
而(!cursor.isAfterLast())
日期=cursor.getString(cursor.getColumnIndex(“日期”);
target=cursor.getString(cursor.getColumnIndex(“target”);
item=cursor.getString(cursor.getColumnIndex(“item”);
Map Map=newhashmap();
地图放置(“日期”,日期);
地图放置(“目标”,目标);
地图放置(“项目”,项目);
列表。添加(地图);
// }
}
退货清单;
}
}
这是舱单

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.robottracking">

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".splash">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".task" />
    <activity android:name=".history" />
    <activity android:name=".MainActivity"></activity>
</application>

</manifest>


请发布异常的完整堆栈跟踪(
printStackTrace()
output)sry我最初没有编写printStackTrace方法,我将开始将其写入活动并查看它将报告什么,但我将发布logcat屏幕截图,尽管这是您应用程序中的logcat?从GSM客户端看,请发布异常的完整堆栈跟踪(
printStackTrace()
output)sry我最初没有编写printStackTrace方法,我将开始将其写入活动并查看它将报告什么,但我将发布logcat屏幕截图,认为这是您应用程序中的logcat吗?看起来像是来自GSM客户端
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.robottracking">

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".splash">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".task" />
    <activity android:name=".history" />
    <activity android:name=".MainActivity"></activity>
</application>

</manifest>