在Gingerbread上运行时,ActiveAndroid应用程序会自动关闭

前端之家收集整理的这篇文章主要介绍了在Gingerbread上运行时,ActiveAndroid应用程序会自动关闭前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个使用 Android Studio和Gradle开发的应用程序.该应用程序使用ActiveAndroid.该应用程序在3.0及以上完美运行.当在Gingerbread设备上运行时,它只会打开,白屏,然后自动关闭.运行应用程序时,logcat中给出的唯一线索如下:
D/dalvikvm﹕ GC_CONCURRENT freed 195K,41% free 3988K/6663K,external 1625K/2137K,paused 0ms+0ms
I/dalvikvm﹕ Failed resolving Landroid/support/v4/media/TransportMediatorJellybeanMR2$1; interface 1088 'Landroid/view/ViewTreeObserver$OnWindowAttachListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v4/media/TransportMediatorJellybeanMR2$1;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v4/media/TransportMediatorJellybeanMR2$2; interface 1089 'Landroid/view/ViewTreeObserver$OnWindowFocusChangeListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v4/media/TransportMediatorJellybeanMR2$2;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v4/media/TransportMediatorJellybeanMR2; interface 180 'Landroid/media/RemoteControlClient$OnGetPlaybackPositionListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v4/media/TransportMediatorJellybeanMR2;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v4/os/ParcelableCompatCreatorHoneycombMR2; interface 224 'Landroid/os/Parcelable$ClassLoaderCreator;'
W/dalvikvm﹕ Link of class 'Landroid/support/v4/os/ParcelableCompatCreatorHoneycombMR2;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/print/PrintHelperKitkat$1; (241)
W/dalvikvm﹕ Link of class 'Landroid/support/v4/print/PrintHelperKitkat$1;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v4/print/PrintHelperKitkat$2$1$1; interface 207 'Landroid/os/CancellationSignal$OnCancelListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v4/print/PrintHelperKitkat$2$1$1;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/print/PrintHelperKitkat$2; (241)
W/dalvikvm﹕ Link of class 'Landroid/support/v4/print/PrintHelperKitkat$2;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/view/AccessibilityDelegateCompatIcs$1; (1064)
W/dalvikvm﹕ Link of class 'Landroid/support/v4/view/AccessibilityDelegateCompatIcs$1;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/view/AccessibilityDelegateCompatJellyBean$1; (1064)
W/dalvikvm﹕ Link of class 'Landroid/support/v4/view/AccessibilityDelegateCompatJellyBean$1;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v4/view/MenuItemCompatIcs$OnActionExpandListenerWrapper; interface 1056 'Landroid/view/MenuItem$OnActionExpandListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v4/view/MenuItemCompatIcs$OnActionExpandListenerWrapper;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v4/view/accessibility/AccessibilityManagerCompatIcs$1; interface 1096 'Landroid/view/accessibility/AccessibilityManager$AccessibilityStateChangeListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v4/view/accessibility/AccessibilityManagerCompatIcs$1;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/view/accessibility/AccessibilityNodeProviderCompatJellyBean$1; (1099)
W/dalvikvm﹕ Link of class 'Landroid/support/v4/view/accessibility/AccessibilityNodeProviderCompatJellyBean$1;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/view/accessibility/AccessibilityNodeProviderCompatKitKat$1; (1099)
W/dalvikvm﹕ Link of class 'Landroid/support/v4/view/accessibility/AccessibilityNodeProviderCompatKitKat$1;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v4/widget/SearchViewCompatHoneycomb$1; interface 1178 'Landroid/widget/SearchView$OnQueryTextListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v4/widget/SearchViewCompatHoneycomb$1;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v4/widget/SearchViewCompatHoneycomb$2; interface 1177 'Landroid/widget/SearchView$OnCloseListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v4/widget/SearchViewCompatHoneycomb$2;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/widget/SearchViewCompatIcs$MySearchView; (1179)
W/dalvikvm﹕ Link of class 'Landroid/support/v4/widget/SearchViewCompatIcs$MySearchView;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v7/app/ActionBarImplHC$CallbackWrapper; interface 1031 'Landroid/view/ActionMode$Callback;'
W/dalvikvm﹕ Link of class 'Landroid/support/v7/app/ActionBarImplHC$CallbackWrapper;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v7/app/ActionBarImplICS$OnMenuVisibilityListenerWrapper; interface 22 'Landroid/app/ActionBar$OnMenuVisibilityListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v7/app/ActionBarImplICS$OnMenuVisibilityListenerWrapper;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v7/app/ActionBarImplICS$OnNavigationListenerWrapper; interface 23 'Landroid/app/ActionBar$OnNavigationListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v7/app/ActionBarImplICS$OnNavigationListenerWrapper;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v7/internal/view/ActionModeWrapper$CallbackWrapper; interface 1031 'Landroid/view/ActionMode$Callback;'
W/dalvikvm﹕ Link of class 'Landroid/support/v7/internal/view/ActionModeWrapper$CallbackWrapper;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v7/internal/view/menu/MenuItemWrapperICS$ActionProviderWrapper; (1034)
W/dalvikvm﹕ Link of class 'Landroid/support/v7/internal/view/menu/MenuItemWrapperICS$ActionProviderWrapper;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v7/internal/view/menu/MenuItemWrapperICS$CollapsibleActionViewWrapper; interface 1035 'Landroid/view/CollapsibleActionView;'
W/dalvikvm﹕ Link of class 'Landroid/support/v7/internal/view/menu/MenuItemWrapperICS$CollapsibleActionViewWrapper;' Failed
D/dalvikvm﹕ GC_CONCURRENT freed 713K,44% free 4167K/7431K,paused 1ms+0ms
I/dalvikvm﹕ Failed resolving Landroid/support/v7/widget/SearchView$5; interface 1072 'Landroid/view/View$OnLayoutChangeListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v7/widget/SearchView$5;' Failed
I/dalvikvm﹕ Failed resolving Lcom/crashlytics/android/internal/G; interface 34 'Landroid/app/Application$ActivityLifecycleCallbacks;'
W/dalvikvm﹕ Link of class 'Lcom/crashlytics/android/internal/G;' Failed
I/dalvikvm﹕ Failed resolving Lcom/crashlytics/android/internal/x; interface 34 'Landroid/app/Application$ActivityLifecycleCallbacks;'
W/dalvikvm﹕ Link of class 'Lcom/crashlytics/android/internal/x;' Failed
I/dalvikvm﹕ Failed resolving Lcom/google/android/gms/analytics/GoogleAnalytics$b; interface 34 'Landroid/app/Application$ActivityLifecycleCallbacks;'
W/dalvikvm﹕ Link of class 'Lcom/google/android/gms/analytics/GoogleAnalytics$b;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Lcom/google/android/gms/common/ErrorDialogFragment; (37)
W/dalvikvm﹕ Link of class 'Lcom/google/android/gms/common/ErrorDialogFragment;' Failed
I/dalvikvm﹕ Failed resolving Lcom/google/android/gms/common/images/ImageManager$e; interface 61 'Landroid/content/ComponentCallbacks2;'
W/dalvikvm﹕ Link of class 'Lcom/google/android/gms/common/images/ImageManager$e;' Failed
D/dalvikvm﹕ GC_CONCURRENT freed 804K,44% free 4332K/7687K,paused 1ms+0ms
W/dalvikvm﹕ Unable to resolve superclass of Lcom/google/android/gms/maps/MapFragment; (38)
W/dalvikvm﹕ Link of class 'Lcom/google/android/gms/maps/MapFragment;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Lcom/google/android/gms/maps/StreetViewPanoramaFragment; (38)
W/dalvikvm﹕ Link of class 'Lcom/google/android/gms/maps/StreetViewPanoramaFragment;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Lcom/google/android/gms/tagmanager/bb$1; (1024)
W/dalvikvm﹕ Link of class 'Lcom/google/android/gms/tagmanager/bb$1;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Lcom/google/android/gms/wallet/fragment/WalletFragment; (38)
W/dalvikvm﹕ Link of class 'Lcom/google/android/gms/wallet/fragment/WalletFragment;' Failed
D/dalvikvm﹕ GC_CONCURRENT freed 884K,43% free 4700K/8135K,paused 0ms+0ms
I/dalvikvm﹕ Failed resolving Landroid/support/v7/app/ActionBarImplICS$TabWrapper; interface 25 'Landroid/app/ActionBar$TabListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v7/app/ActionBarImplICS$TabWrapper;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v7/internal/view/ActionModeWrapper$CallbackWrapper; interface 1031 'Landroid/view/ActionMode$Callback;'
W/dalvikvm﹕ Link of class 'Landroid/support/v7/internal/view/ActionModeWrapper$CallbackWrapper;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v7/internal/view/ActionModeWrapperJB$CallbackWrapper; (829)
W/dalvikvm﹕ Link of class 'Landroid/support/v7/internal/view/ActionModeWrapperJB$CallbackWrapper;' Failed
I/dalvikvm﹕ Failed resolving Landroid/support/v7/internal/view/menu/MenuItemWrapperICS$OnActionExpandListenerWrapper; interface 1056 'Landroid/view/MenuItem$OnActionExpandListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v7/internal/view/menu/MenuItemWrapperICS$OnActionExpandListenerWrapper;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v7/internal/view/menu/MenuItemWrapperICS$ActionProviderWrapper; (1034)
W/dalvikvm﹕ Link of class 'Landroid/support/v7/internal/view/menu/MenuItemWrapperICS$ActionProviderWrapper;' Failed
W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v7/internal/view/menu/MenuItemWrapperJB$ActionProviderWrapperJB; (865)
W/dalvikvm﹕ Link of class 'Landroid/support/v7/internal/view/menu/MenuItemWrapperJB$ActionProviderWrapperJB;' Failed
D/dalvikvm﹕ Note: class Lcom/google/android/gms/games/internal/IGamesService$Stub; has 151 unimplemented (abstract) methods
I/dalvikvm﹕ Failed resolving Lcom/google/android/gms/games/internal/PopupManager$PopupManagerHCMR1; interface 1067 'Landroid/view/View$OnAttachStateChangeListener;'
W/dalvikvm﹕ Link of class 'Lcom/google/android/gms/games/internal/PopupManager$PopupManagerHCMR1;' Failed
D/dalvikvm﹕ GC_CONCURRENT freed 969K,42% free 4870K/8391K,paused 1ms+0ms
D/dalvikvm﹕ GC_CONCURRENT freed 992K,42% free 5039K/8583K,paused 1ms+0ms

我的gradle文件如下所示:

buildscript {
    repositories {
        mavenCentral()
        maven { url 'http://download.crashlytics.com/maven' }

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.9.+'
        classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
    }
}
apply plugin: 'android'
apply plugin: 'crashlytics'

repositories {
    mavenCentral()
    flatDir name: 'localRepository',dirs: 'libs-aar'
    maven { url 'http://download.crashlytics.com/maven' }
}

tasks.withType(JavaCompile) {
    options.encoding = "UTF-8"
}

dependencies {
    compile 'com.google.android.gms:play-services:4.+'
    compile 'com.android.support:support-v4:19.1.+'
    compile 'com.android.support:appcompat-v7:19.1.+'
    compile group: 'com.google.guava',name: 'guava',version: '16.+'
    compile fileTree(dir: "libs",include:'lottusse_android.jar')
    compile fileTree(dir: "$buildDir/native-libs",include: 'native-libs.jar')
    compile 'drag-sort-listview:drag-sort-listview:@aar'
    compile fileTree(dir: "libs",include:'ActiveAndroid.jar')
    compile 'com.crashlytics.android:crashlytics:1.+'

}

android {
    compileSdkVersion 19
    buildToolsVersion '19.0.3'

    aaptOptions.useAaptPngCruncher = true

    sourceSets.main {
        jniLibs.srcDir 'libs'
        jni.srcDirs = [] //disable automatic ndk-build call
    }

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 19
        versionCode 163
        versionName "1.1.1"
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
}

我试过运行Gingerbread的低端三星手机以及运行2.3.7的Gennymotion模拟器.调试后,我发现在ActiveAndroid.initialize方法中执行scanForModel方法时应用程序挂起.

提前致谢

解决方法

如果您不手动提供模型类,ActiveAndroid将在应用程序启动时自动在.dex文件搜索它.
这可能会消耗大量内存.

您可以在Activity或manifest中添加模型类.

更多信息:

How to disable scanning for model in Activeandroid

原文链接:https://www.f2er.com/android/317806.html

猜你在找的Android相关文章