当我将目标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) 这可能是重复的问题,但在尝试所有解决方案后,我无法解决以下错误:
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: AAPT process not ready to receive commands
Run Code Online (Sandbox Code Playgroud)
我试过除了一个解决方案以外
sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1
Run Code Online (Sandbox Code Playgroud)
在执行这些命令之前,命令究竟是什么?如果有人有其他解决方案,请告诉我,这将是非常有用的..
android ×2