Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

App crashes on Android 2.3.x #46

Closed
matthiaswenz opened this issue Jun 8, 2015 · 3 comments
Closed

App crashes on Android 2.3.x #46

matthiaswenz opened this issue Jun 8, 2015 · 3 comments

Comments

@matthiaswenz
Copy link
Contributor

Hi,
on any Android 2.3.x-devices my app crashes upon startup with the following stack trace:

3089-3089/net.hockeyapp.client E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.NoClassDefFoundError: com.microsoft.applicationinsights.library.f
            at com.microsoft.applicationinsights.library.ApplicationInsights.startInstance(ApplicationInsights.java:203)
            at com.microsoft.applicationinsights.library.ApplicationInsights.start(ApplicationInsights.java:169)
            at net.hockeyapp.client.HomeActivity.onCreate(HomeActivity.java:67)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1674)
            at android.app.ActivityThread.access$1500(ActivityThread.java:117)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:942)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:130)
            at android.app.ActivityThread.main(ActivityThread.java:3694)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:507)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
            at dalvik.system.NativeStart.main(Native Method)

Here's my environment:

  • several Android 2.3.x devices (LG P970, 2.3.4, Genymotion Nexus One Emulator, 2.3.7)
  • MSAI Android SDK 1.0 beta 2 / beta 4
  • integrated via Maven

Please let me know if you need additional information.
Best,
Mat

@southwood
Copy link
Contributor

This looks like it could be related to pro guard rules since the offending method is named "java.lang.NoClassDefFoundError: com.microsoft.applicationinsights.library.f"

I wrote the pro guard excludes before we refactored the code to match iOS architecture. We probably need to either update this file (https://github.com/Microsoft/ApplicationInsights-Android/blob/master/applicationinsights-android/proguard-rules.pro) to accommodate the new public interface or make an the class represented by "java.lang.NoClassDefFoundError: com.microsoft.applicationinsights.library.f" public so that the existing rule catches it.

-Scott


From: Matthias Wenz <notifications@github.commailto:notifications@github.com>
Sent: Monday, June 8, 2015 2:34 AM
Subject: [ApplicationInsights-Android] App crashes on Android 2.3.x (#46)
To: Microsoft/ApplicationInsights-Android <applicationinsights-android@noreply.github.commailto:applicationinsights-android@noreply.github.com>

Hi,
on any Android 2.3.x-devices my app crashes upon startup with the following stack trace:

3089-3089tel:3089-3089/net.hockeyapp.client E/AndroidRuntime? FATAL EXCEPTION: main java.lang.NoClassDefFoundError: com.microsoft.applicationinsights.library.f at com.microsoft.applicationinsights.library.ApplicationInsights.startInstance(ApplicationInsights.java:203) at com.microsoft.applicationinsights.library.ApplicationInsights.start(ApplicationInsights.java:169) at net.hockeyapp.client.HomeActivity.onCreate(HomeActivity.java:67) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1674) at android.app.ActivityThread.access$1500(ActivityThread.java:117) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3694) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) at dalvik.system.NativeStart.main(Native Method)

Here's my environment:

  • several Android 2.3.x devices (LG P970, 2.3.4, Genymotion Nexus One Emulator, 2.3.7)
  • MSAI Android SDK 1.0 beta 2 / beta 4
  • integrated via Maven

Please let me know if you need additional information.
Best,
Mat

Reply to this email directly or view it on GitHubhttps://github.com//issues/46.

@matthiaswenz
Copy link
Contributor Author

The class in question is LifeCycleTracking - no need to make the class public, instead #48 should mitigate this issue.

@ElektrojungeAtWork
Copy link
Contributor

Fixed in #48

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants