APK not installing after Azure Devops Build

GreekTreatGreekTreat Member ✭✭

I've built and pushed my apk to Appcenter. I get notified by email there is a new version to download. I Download and click Install. then it just prompts me that install failed. I didn't set up signing the apk. copuld that be the problem? how can I find the error in android?

Answers

  • SuchithSuchith INMember ✭✭✭

    @GreekTreat Open device log from visual studio(View->Pads->DeviceLog) and check for log while connecting device. Filter log by your app name or app id.

  • GreekTreatGreekTreat Member ✭✭
    edited July 25

    @Suchith said:
    @GreekTreat Open device log from visual studio(View->Pads->DeviceLog) and check for log while connecting device. Filter log by your app name or app id.

    Thnks I was apple to connect and see the logs. they don't show any errors, just 
    Time    Device Name Type    PID Tag Message
    07-25 09:40:45.661  Samsung SM-G960W    Debug   5118    AppsLoader  updateSessionDisplayInfo com.salesapp
    07-25 09:40:45.661  Samsung SM-G960W    Info    5118    Launcher.IconCache  cachePackageInstallInfo packageName = com.salesapp, title = null, icon = false
    07-25 09:40:45.661  Samsung SM-G960W    Debug   5118    PackageInstallerCompat  add PAI Info to Cache : com.salesapp, null, null
    07-25 09:40:38.539  Samsung SM-G960W    Info    20821   AppIconSolution load=com.salesapp-theme2, bg=144-144, dr=137-216, tarScale=1.1, relScale=0.62666667, mask=false
    07-25 09:40:38.538  Samsung SM-G960W    Info    20821   AppIconSolution load=com.salesapp, bg=144-144, dr=1125-1764, forDefault=false, density=0
    

    BUT Then I connected command line : adb logcat > C:\Temp\AndroidLogs.txt
    Found this error:
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: Process: com.salesapp, PID: 10069
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: android.runtime.JavaProxyThrowable: System.NotSupportedException: Could not activate JNI Handle 0x7ff623ecd0 (key_handle 0x905c184) of Java type 'md58a2ba2357b559796fe19aba563dae98f/ProgramCodeDownloaderService' as managed type 'SalesApp.Droid.Services.ProgramCodeDownloaderService'. ---> System.InvalidOperationException: ServiceLocationProvider must be set.
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at CommonServiceLocator.ServiceLocator.get_Current () [0x00007] in :0
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at SalesApp.Droid.Services.ProgramCodeDownloaderService..ctor () [0x00000] in :0
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.6(intptr,object[])
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at Java.Interop.TypeManager.n_Activate (System.IntPtr jnienv, System.IntPtr jclass, System.IntPtr typename_ptr, System.IntPtr signature_ptr, System.IntPtr jobject, System.IntPtr parameters_ptr) [0x000e1] in :0
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: --- End of inner exception stack trace ---
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at Java.Interop.TypeManager.n_Activate (System.IntPtr jnienv, System.IntPtr jclass, System.IntPtr typename_ptr, System.IntPtr signature_ptr, System.IntPtr jobject, System.IntPtr parameters_ptr) [0x0016c] in :0
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.2(intptr,intptr,intptr,intptr,intptr,intptr)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at mono.android.TypeManager.n_activate(Native Method)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at mono.android.TypeManager.Activate(TypeManager.java:7)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at md58a2ba2357b559796fe19aba563dae98f.ProgramCodeDownloaderService.(ProgramCodeDownloaderService.java:24)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at java.lang.Class.newInstance(Native Method)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at android.app.AppComponentFactory.instantiateService(AppComponentFactory.java:103)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:3710)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at android.app.ActivityThread.access$1400(ActivityThread.java:235)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1784)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6981)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    07-25 09:15:57.929 10069 10069 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445)

    In my App I have a background service ProgramCodeDownloaderService
    it is called in MainActivity.cs like this:
    _salesAppMessaging.SubscribeProgramCodeDownloadStarted(this, message =>
    {
    var intent = new Intent(this, typeof(ProgramCodeDownloaderService));
    intent.PutExtra("agentId", message.AgentId);
    StartService(intent);
    });

  • GreekTreatGreekTreat Member ✭✭
    edited July 25

    BTW this works when deploying to the same phone through VS in debug mode

Sign In or Register to comment.