当我将目标sdk级别从23.0.2更改为25.0.1时.我的应用程序在下面的行中崩溃了.我该怎么做才能避免这次崩溃?请提出修改建议.
InstanceID instanceID = InstanceID.getInstance(getContext());
Run Code Online (Sandbox Code Playgroud)
错误日志:
AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
Process: com.tuitoapp.admin, PID: 19012 java.lang.RuntimeException: An error occured while executing doInBackground()
Caused by: java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.<init>()' is inaccessible to class 'com.google.android.gms.iid.zzd' (declaration of 'com.google.android.gms.iid.zzd' appears in /data/data/com.tuitoapp.admin/files/instant-run/dex/slice-com.google.android.gms-play-services-gcm-8.3.0_7fd6e981c2dc6578e4c382ecd19f08197a01f8b5-classes.dex)
at com.google.android.gms.iid.zzd.zzdL(Unknown Source)
at com.google.android.gms.iid.InstanceID.zza(Unknown Source)
at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
Run Code Online (Sandbox Code Playgroud)
我的应用程序是:
// compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'org.achartengine:achartengine:1.2.0'
compile('com.crashlytics.sdk.android:crashlytics:2.6.2@aar') {
transitive = true;
}
compile 'org.jsoup:jsoup:1.8.3'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.pkmmte.view:circularimageview:1.1'
compile 'com.android.support:cardview-v7:25.0.1'
compile 'org.achartengine:achartengine:1.2.0'
compile …Run Code Online (Sandbox Code Playgroud) 我使用Samsung S Health SDK开发了我的应用程序.我想在我的应用程序中添加S Health的步行,跑步和骑行跟踪.
如何添加这些功能?
我正在做一个项目,我使用带有wakefulBroadcastReceiver 的意图服务来安排警报和发送通知。到目前为止没有问题。但我希望当我打开我的应用程序时,它不再显示通知。请问这个问题有什么想法吗?