我构建了一个可在playstore外自动更新的应用程序。我收到此错误:
不可转换的类型;无法投 ca.example.autoupdate.NotificationActivity以 android.support.v7.app.AlertController.ButtonHandler
我打Intent intent = new Intent(Intent.ACTION_VIEW);
我在下面有跟踪文件转储:
----- pid 747 at 2019-09-04 21:04:47 -----
Cmd line: system_server
ABI: arm
Build type: optimized
Zygote loaded classes=3650 post zygote classes=4199
Intern table: 71417 strong; 13181 weak
JNI: CheckJNI is off; globals=4653 (plus 135 weak)
Libraries: /system/lib/libanalytics.so /system/lib/libandroid.so /system/lib/libandroid_runtime.so /system/lib/libandroid_servers.so /system/lib/libandroid_ssrm.so /system/lib/libaudioeffect_jni.so /system/lib/libcompiler_rt.so /system/lib/libdrmframework_jni.so /system/lib/libedmnativehelperservice.so /system/lib/libengmode.so /system/lib/libjavacrypto.so /system/lib/libjnigraphics.so /system/lib/libknoxvpnfdsender.so /system/lib/libmedia_jni.so /system/lib/libnativemr.so /system/lib/librs_jni.so /system/lib/libsoundpool.so /system/lib/libterrier.so /system/lib/libwebviewchromium_loader.so /system/lib/libwifi-service.so /system/lib/slocation/libsgeo.so libjavacore.so (22)
Heap: 5% free, 49MB/52MB; 598368 objects
Dumping cumulative Gc timings
Start Dumping histograms for 4478 iterations for concurrent mark sweep
ProcessMarkStack: Sum: 798.991s 99% C.I. 0.096ms-486.127ms Avg: 59.475ms Max: 1049.255ms
SweepMallocSpace: Sum: 95.961s 99% C.I. 0.092ms-90.421ms Avg: 10.714ms Max: 705.505ms
MarkRootsCheckpoint: Sum: 37.025s 99% C.I. 0.061ms-34.023ms Avg: 4.134ms Max: 219.726ms
MarkConcurrentRoots: Sum: 29.297s 99% C.I. 0.016ms-28.850ms Avg: 3.271ms Max: 131.011ms
ScanGrayAllocSpaceObjects: Sum: 28.619s 99% C.I. 0.015ms-30.887ms Avg: 3.195ms Max: 96.984ms
UpdateAndMarkImageModUnionTable: Sum: 26.331s 99% C.I. 1.621ms-36.384ms Avg: 5.880ms Max: 150.543ms
MarkNonThreadRoots: Sum: 13.565s 99% C.I. 0.064ms-22.584ms Avg: 1.514ms Max: 672.698ms
AllocSpaceClearCards: Sum: 13.241s 99% C.I. 4.004us-6064us Avg: 739.262us Max: 38116us
ReMarkRoots: Sum: 10.772s 99% C.I. 1.602ms-13.762ms Avg: 2.405ms Max: 75.531ms
MarkAllocStackAsLive: Sum: 9.569s 99% C.I. 0.030ms-14.921ms Avg: 2.137ms Max: 64.483ms
SweepLargeObjects: Sum: 8.246s 99% C.I. 0.064ms-23.859ms Avg: 1.841ms Max: 770.080ms
EnqueueFinalizerReferences: Sum: 6.564s 99% C.I. 0.402ms-7.840ms Avg: 1.465ms Max: 31.433ms
SweepSystemWeaks: Sum: 6.446s 99% C.I. 0.064ms-12.761ms Avg: 1.439ms Max: 672.485ms
(Paused)ScanGrayAllocSpaceObjects: Sum: 3.580s 99% C.I. 1.002us-2390.250us Avg: 399.777us Max: 9033us
FinishPhase: Sum: 1.883s 99% C.I. 61us-3661us Avg: 420.646us Max: 25634us
ProcessReferences: Sum: 1.830s 99% C.I. 200.428us-3107.333us Avg: 408.843us Max: 17578us
ImageModUnionClearCards: Sum: 1.746s 99% C.I. 122us-916us Avg: 194.991us Max: 18524us
SweepZygoteSpace: Sum: 1.712s 99% C.I. 274us-2130us Avg: 383.101us Max: 10223us
RevokeAllThreadLocalAllocationStacks: Sum: 820.851ms 99% C.I. 150.099us-432.624us Avg: 183.307us Max: 2075us
ZygoteModUnionClearCards: Sum: 751.341ms 99% C.I. 61us-364.186us Avg: 84.042us Max: 12481us
ScanGrayImageSpaceObjects: Sum: 598.570ms 99% C.I. 91us-915.249us Avg: 133.669us Max: 4425us
(Paused)ScanGrayImageSpaceObjects: Sum: 518.366ms 99% C.I. 61us-298.700us Avg: 115.758us Max: 9796us
ReclaimPhase: Sum: 335.927ms 99% C.I. 2.052us-2644us Avg: 75.017us Max: 20233us
ScanGrayZygoteSpaceObjects: Sum: 302.070ms 99% C.I. 30us-238.750us Avg: 67.577us Max: 4791us
(Paused)ScanGrayZygoteSpaceObjects: Sum: 203.396ms 99% C.I. 30us-131.022us Avg: 45.502us Max: 2014us
MarkingPhase: Sum: 188.505ms 99% C.I. 1.006us-430.500us Avg: 42.095us Max: 10162us
PreCleanCards: Sum: 188.138ms 99% C.I. 0.514us-199.638us Avg: 42.013us Max: 7293us
ProcessCards: Sum: 178.279ms 99% C.I. 0.502us-99.980us Avg: 19.906us Max: 5279us
(Paused)PausePhase: Sum: 159.727ms 99% C.I. 0.374us-146.036us Avg: 35.669us Max: 518us
Sweep: Sum: 148.616ms 99% C.I. 1.002us-199.534us Avg: 33.188us Max: 18798us
SwapBitmaps: Sum: 132.627ms 99% C.I. 0.265us-123.049us Avg: 29.617us Max: 4943us
MarkRoots: Sum: 99.979ms 99% C.I. 0.289us-99.799us Avg: 22.326us Max: 1922us
RecursiveMark: Sum: 52.158ms 99% C.I. 0.257us-93.337us Avg: 11.647us Max: 1403us
SwapStacks: Sum: 36.399ms 99% C.I. 0.500us-99.522us Avg: 8.128us Max: 9063us
(Paused)ProcessMarkStack: Sum: 34.759ms 99% C.I. 0.259us-174.249us Avg: 7.762us Max: 854us
InitializePhase: Sum: 26.065ms 99% C.I. 0.250us-49.917us Avg: 5.820us Max: 1190us
BindBitmaps: Sum: 20.613ms 99% C.I. 0.250us-49.761us Avg: 4.603us Max: 213us
UnBindBitmaps: Sum: 9.182ms 99% C.I. 0.250us-49.772us Avg: 2.050us Max: 91us
FindDefaultSpaceBitmap: Sum: 8.555ms 99% C.I. 0.250us-49.794us Avg: 1.910us Max: 122us
PreSweepingGcVerification: Sum: 6.785ms 99% C.I. 0.250us-49.783us Avg: 1.515us Max: 122us
Done Dumping histograms
concurrent mark sweep paused: Sum: 16.656s 99% C.I. 0.274ms-17.812ms Avg: 3.719ms Max: 77.087ms
concurrent mark sweep total time: 1100.208s mean time: 245.691ms
concurrent mark sweep freed: 278312155 objects with total size 19GB
concurrent mark sweep throughput: 252963/s / 18MB/s
Start Dumping histograms for 191 iterations for partial concurrent mark sweep
ProcessMarkStack: Sum: 34.668s 99% C.I. 0.098ms-321.727ms Avg: 60.503ms Max: 855.590ms
SweepMallocSpace: Sum: 6.962s 99% C.I. 0.109ms-96.576ms Avg: 18.227ms Max: 813.262ms
MarkRootsCheckpoint: Sum: 2.166s 99% C.I. 0.885ms-39.847ms Avg: 5.670ms Max: 47.912ms
MarkConcurrentRoots: Sum: 1.909s 99% C.I. 0.066ms-45.376ms Avg: 4.998ms Max: 678.344ms
ScanGrayAllocSpaceObjects: Sum: 1.892s 99% C.I. 0.008ms-29.815ms Avg: 4.955ms Max: 47.546ms
UpdateAndMarkImageModUnionTable: Sum: 1.335s 99% C.I. 2.868ms-59.271ms Avg: 6.990ms Max: 60.302ms
SweepLargeObjects: Sum: 1.279s 99% C.I. 0.396ms-33.979ms Avg: 6.699ms Max: 75.775ms
AllocSpaceClearCards: Sum: 540.076ms 99% C.I. 1.018us-3353.999us Avg: 706.905us Max: 5981us
ReMarkRoots: Sum: 484.370ms 99% C.I. 0.671ms-10.352ms Avg: 2.535ms Max: 13.427ms
MarkNonThreadRoots: Sum: 473.414ms 99% C.I. 0.063ms-14.379ms Avg: 1.239ms Max: 19.409ms
EnqueueFinalizerReferences: Sum: 426.963ms 99% C.I. 0.382ms-5.923ms Avg: 2.235ms Max: 12.756ms
MarkAllocStackAsLive: Sum: 423.859ms 99% C.I. 0.213ms-10.957ms Avg: 2.219ms Max: 22.796ms
SweepSystemWeaks: Sum: 256.904ms 99% C.I. 0.668ms-5.316ms Avg: 1.345ms Max: 7.781ms
(Paused)ScanGrayAllocSpaceObjects: Sum: 201.055ms 99% C.I. 0.746us-3563.499us Avg: 526.321us Max: 3997us
UpdateAndMarkZygoteModUnionTable: Sum: 156.973ms 99% C.I. 191us-10426.999us Avg: 821.848us Max: 10986us
ProcessReferences: Sum: 83.839ms 99% C.I. 15.916us-2063.499us Avg: 438.947us Max: 2349us
FinishPhase: Sum: 78.058ms 99% C.I. 143.250us-1463.499us Avg: 408.680us Max: 1739us
ImageModUnionClearCards: Sum: 68.454ms 99% C.I. 122us-408.999us Avg: 179.198us Max: 2014us
RevokeAllThreadLocalAllocationStacks: Sum: 37.255ms 99% C.I. 91us-917.999us Avg: 195.052us Max: 1251us
ZygoteModUnionClearCards: Sum: 36.520ms 99% C.I. 30us-452.999us Avg: 95.602us Max: 7110us
ScanGrayImageSpaceObjects: Sum: 29.706ms 99% C.I. 91us-2152.249us Avg: 155.528us Max: 2166us
(Paused)ScanGrayImageSpaceObjects: Sum: 22.559ms 99% C.I. 91us-213us Avg: 118.109us Max: 213us
ScanGrayZygoteSpaceObjects: Sum: 11.732ms 99% C.I. 30us-511.249us Avg: 61.424us Max: 732us
(Paused)ScanGrayZygoteSpaceObjects: Sum: 9.190ms 99% C.I. 30us-206.749us Avg: 48.115us Max: 305us
MarkingPhase: Sum: 9.168ms 99% C.I. 0.482us-211.249us Avg: 48us Max: 427us
ReclaimPhase: Sum: 8.678ms 99% C.I. 0.348us-813.499us Avg: 45.434us Max: 1098us
PreCleanCards: Sum: 8.549ms 99% C.I. 0.404us-256.749us Avg: 44.759us Max: 396us
(Paused)PausePhase: Sum: 8.194ms 99% C.I. 0.454us-183us Avg: 42.900us Max: 183us
ProcessCards: Sum: 8.061ms 99% C.I. 0.280us-122.499us Avg: 21.102us Max: 366us
SwapBitmaps: Sum: 5.421ms 99% C.I. 0.262us-179.249us Avg: 28.382us Max: 762us
Sweep: Sum: 5.107ms 99% C.I. 0.308us-102.249us Avg: 26.738us Max: 122us
(Paused)ProcessMarkStack: Sum: 4.121ms 99% C.I. 0.268us-452.249us Avg: 21.575us Max: 488us
MarkRoots: Sum: 3.563ms 99% C.I. 0.284us-91us Avg: 18.654us Max: 91us
RecursiveMark: Sum: 1.894ms 99% C.I. 0.255us-61us Avg: 9.916us Max: 61us
InitializePhase: Sum: 1.351ms 99% C.I. 0.251us-52.249us Avg: 7.073us Max: 61us
BindBitmaps: Sum: 630us 99% C.I. 0.250us-30us Avg: 3.298us Max: 30us
FindDefaultSpaceBitmap: Sum: 570us 99% C.I. 0.250us-30us Avg: 2.984us Max: 30us
SweepZygoteSpace: Sum: 420us 99% C.I. 0.250us-30us Avg: 2.198us Max: 30us
PreSweepingGcVerification: Sum: 300us 99% C.I. 0.250us-30us Avg: 1.570us Max: 30us
Done Dumping histograms
partial concurrent mark sweep paused: Sum: 819.248ms 99% C.I. 1.910ms-19.314ms Avg: 4.289ms Max: 25.421ms
partial concurrent mark sweep total time: 53.623s mean time: 280.751ms
partial concurrent mark sweep freed: 21172065 objects with total size 2GB
partial concurrent mark sweep throughput: 394832/s / 48MB/s
Start Dumping histograms for 946 iterations for sticky concurrent mark sweep
FreeList: Sum: 32.423s 99% C.I. 64.005us-12736.995us Avg: 230.420us Max: 723022us
ScanGrayAllocSpaceObjects: Sum: 31.970s 99% C.I. 0.084ms-76.902ms Avg: 8.448ms Max: 769.378ms
SweepArray: Sum: 10.443s 99% C.I. 1.018ms-45.447ms Avg: 11.039ms Max: 73.699ms
MarkRootsCheckpoint: Sum: 7.857s 99% C.I. 0.445ms-33.231ms Avg: 4.152ms Max: 75.653ms
ProcessMarkStack: Sum: 6.639s 99% C.I. 0.010ms-29.614ms Avg: 1.755ms Max: 101.593ms
MarkConcurrentRoots: Sum: 4.306s 99% C.I. 0.004ms-14.615ms Avg: 2.276ms Max: 33.081ms
AllocSpaceClearCards: Sum: 3.330s 99% C.I. 2.006us-4738.666us Avg: 880.069us Max: 15594us
ReMarkRoots: Sum: 2.328s 99% C.I. 0.270ms-15.015ms Avg: 2.461ms Max: 23.040ms
MarkNonThreadRoots: Sum: 1.442s 99% C.I. 36.384us-9631.999us Avg: 762.641us Max: 21942us
SweepSystemWeaks: Sum: 1.291s 99% C.I. 0.546ms-10.139ms Avg: 1.365ms Max: 23.193ms
EnqueueFinalizerReferences: Sum: 1.226s 99% C.I. 0.011ms-12.507ms Avg: 1.296ms Max: 16.815ms
(Paused)ScanGrayAllocSpaceObjects: Sum: 818.543ms 99% C.I. 1.007us-2353.999us Avg: 432.633us Max: 8514us
ZygoteModUnionClearCards: Sum: 600.406ms 99% C.I. 32.016us-6371.374us Avg: 318.011us Max: 434570us
MarkingPhase: Sum: 503.536ms 99% C.I. 301.070us-2326.999us Avg: 532.279us Max: 9613us
ScanGrayImageSpaceObjects: Sum: 385.630ms 99% C.I. 91us-3753.999us Avg: 203.821us Max: 7598us
ImageModUnionClearCards: Sum: 365.124ms 99% C.I. 122us-954us Avg: 192.983us Max: 7354us
ResetStack: Sum: 251.254ms 99% C.I. 30us-1253.999us Avg: 265.596us Max: 13122us
RevokeAllThreadLocalAllocationStacks: Sum: 179.239ms 99% C.I. 30us-626.999us Avg: 189.470us Max: 5920us
ScanGrayZygoteSpaceObjects: Sum: 154.456ms 99% C.I. 30us-259.333us Avg: 81.809us Max: 5523us
(Paused)ScanGrayImageSpaceObjects: Sum: 107.696ms 99% C.I. 91us-281.750us Avg: 113.843us Max: 915us
ProcessReferences: Sum: 71.267ms 99% C.I. 1.019us-853.999us Avg: 75.335us Max: 12695us
FinishPhase: Sum: 69.278ms 99% C.I. 30us-490.499us Avg: 73.232us Max: 2136us
ReclaimPhase: Sum: 53.556ms 99% C.I. 0.515us-2013.499us Avg: 56.613us Max: 9643us
(Paused)ScanGrayZygoteSpaceObjects: Sum: 51.838ms 99% C.I. 30us-157us Avg: 54.913us Max: 2349us
ForwardSoftReferences: Sum: 51.245ms 99% C.I. 2.010us-456us Avg: 54.284us Max: 28930us
ProcessCards: Sum: 36.053ms 99% C.I. 0.284us-99.671us Avg: 19.055us Max: 946us
PreCleanCards: Sum: 35.705ms 99% C.I. 0.377us-187.642us Avg: 37.743us Max: 854us
(Paused)PausePhase: Sum: 33.633ms 99% C.I. 0.369us-147.972us Avg: 35.552us Max: 274us
MarkRoots: Sum: 16.334ms 99% C.I. 0.275us-98.375us Avg: 17.266us Max: 1068us
(Paused)ProcessMarkStack: Sum: 14.331ms 99% C.I. 0.268us-256.749us Avg: 15.149us Max: 518us
SwapBitmaps: Sum: 10.776ms 99% C.I. 0.251us-49.961us Avg: 11.391us Max: 122us
RecordFree: Sum: 6.091ms 99% C.I. 0.250us-49.802us Avg: 6.438us Max: 91us
SwapStacks: Sum: 5.828ms 99% C.I. 0.251us-68.916us Avg: 6.160us Max: 152us
FindDefaultSpaceBitmap: Sum: 5.193ms 99% C.I. 0.250us-49.908us Avg: 5.489us Max: 91us
BindBitmaps: Sum: 5.070ms 99% C.I. 0.250us-30us Avg: 5.359us Max: 30us
InitializePhase: Sum: 4.350ms 99% C.I. 0.250us-30us Avg: 4.598us Max: 30us
UnBindBitmaps: Sum: 4.264ms 99% C.I. 0.250us-49.855us Avg: 4.507us Max: 213us
PreSweepingGcVerification: Sum: 1.470ms 99% C.I. 0.250us-30us Avg: 1.553us Max: 30us
Done Dumping histograms
sticky concurrent mark sweep paused: Sum: 3.685s 99% C.I. 0.788ms-17.635ms Avg: 3.896ms Max: 27.984ms
sticky concurrent mark sweep total time: 107.103s mean time: 113.216ms
sticky concurrent mark sweep freed: 142836541 objects with total size 8GB
sticky concurrent mark sweep throughput: 1.33364e+06/s / 84MB/s
Total time spent in GC: 1260.934s
Mean GC size throughput: 19MB/s
Mean GC object throughput: 350682 objects/s
Total number of allocations 442785265
Total bytes allocated 23GB
Free memory 2MB
Free memory until GC 2MB
Free memory until OOME 206MB
Total memory 52MB
Max memory 256MB
Total mutator paused time: 21.161s
Total time waiting for GC to complete: 21.339s
DALVIK THREADS (136):
"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 obj=0x75f2f000 self=0xb4427800
| sysTid=747 nice=-2 cgrp=default sched=0/0 handle=0xb6fa8bec
| state=S schedstat=( 0 0 0 ) utm=52317 stm=49808 core=0 HZ=100
| stack=0xbe5cb000-0xbe5cd000 stackSize=8MB
| held mutexes=
kernel: (couldn't read /proc/self/task/747/stack)
native: #00 pc 0003b254 /system/lib/libc.so (__epoll_pwait+20)
native: #01 pc 000151df /system/lib/libc.so (epoll_pwait+26)
native: #02 pc 000151ed /system/lib/libc.so (epoll_wait+6)
native: #03 pc 00012587 /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+98)
native: #04 pc 000127b1 /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+92)
native: #05 pc 0008934d /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvi+22)
native: #06 pc 000b68c3 /system/framework/arm/boot.oat (Java_android_os_MessageQueue_nativePollOnce__JI+102)
at android.os.MessageQueue.nativePollOnce(Native method)
at android.os.MessageQueue.next(MessageQueue.java:143)
at android.os.Looper.loop(Looper.java:130)
at com.android.server.SystemServer.run(SystemServer.java:470)
at com.android.server.SystemServer.main(SystemServer.java:354)
at java.lang.reflect.Method.invoke!(Native method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
这是我收到错误消息的活动:
package ca.example.autoupdate;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.widget.Toast;
import java.io.File;
import java.net.URI;
import static ca.example.autoupdate.App.MyPREFERENCES;
public class NotificationActivity extends AppCompatActivity {
private Uri uri;
private String downloadedAPKUrl;
private String notificationType;
private SharedPreferences sharedPref;
private SharedPreferences.Editor editor;
private String urlLink=null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_notification);
// Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
// setSupportActionBar(toolbar);
sharedPref = this.getSharedPreferences(MyPREFERENCES,Context.MODE_PRIVATE);
editor = sharedPref.edit();
String notificationType = sharedPref.getString("notificationType",null);
if(notificationType.equalsIgnoreCase("update")) {
urlLink = sharedPref.getString("urlLink",null);
File file = new File(urlLink);
if (Build.VERSION.SDK_INT < 24) {
uri = Uri.fromFile(file);
} else {
uri = Uri.parse(file.getPath());
}
updateApp();
}
else if(notificationType.equalsIgnoreCase("exception"))
{
String exception = sharedPref.getString("exception",null);
AlertDialog alertDialog = new AlertDialog.Builder(this).setTitle("Error Notification")
.setMessage("AppUpdate could check for update or could be update due to this error - "+exception )
.setPositiveButton("Okay", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
editor.putInt("duration",1);
editor.commit();
// App.get().scheduleJob();
Intent intent = new Intent(NotificationActivity.this, MainActivity.class);
startActivity(intent);
}
}).create();
alertDialog.show();
}
}
private void startAppUpdate()
{
final AlertDialog alertDialog = new AlertDialog.Builder(this).setTitle("New Version Available")
.setMessage("New version now available. Please update to this newer version")
.setPositiveButton("Update", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
// alertDialog.dismiss();
}
})
.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
editor.putInt("duration",1);
editor.commit();
// App.get().scheduleJob();
Intent intent = new Intent(NotificationActivity.this, MainActivity.class);
startActivity(intent);
}
}).create();
alertDialog.show();
}
public void updateApp() {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri, "application/vnd.android.package-archive");
// intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
//intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
// startActivityForResult(intent, 1);
startActivity(intent);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == 1)
{
if (resultCode == Activity.RESULT_CANCELED) {
Toast.makeText(this, "You have choosen to cancel installation. Reminder will be sent you in 24hrs", Toast.LENGTH_LONG).show();
}
else if (resultCode == RESULT_OK) {
Log.i("app-tt","I am here");
// App.get().scheduleJob();
// Toast.makeText(this, "User pressed 'Open' button", Toast.LENGTH_LONG).show();
}
}
super.onActivityResult(requestCode, resultCode, data);
}
}
错误:不可转换的类型;无法投 'ca.example.autoupdate.NotificationActivity' 'android.support.v7.app.AlertController.ButtonHandler'