本文介绍了ActiveAndroid应用autocloses姜饼上运行时,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经与Android Studio和摇篮开发的应用程序。该应用程序使用ActiveAndroid。该应用程序的工作原理完全可以在3.0以上。当它只是打开一个姜饼设备,白色的屏幕上运行,然后自动关闭。在当应用程序被运行logcat中给出的唯一的线索是:

I have an app developed with Android Studio and Gradle. The app uses ActiveAndroid. The app works perfectly on 3.0 and up. When run on a Gingerbread device it just opens, white screen, and then closes automatically. The only clue given in the logcat when app is run is the following:

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, external 1625K/2137K, 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, external 1625K/2137K, 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, external 1625K/2137K, 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, external 1625K/2137K, paused 1ms+0ms
D/dalvikvm﹕ GC_CONCURRENT freed 992K, 42% free 5039K/8583K, external 1625K/2137K, paused 1ms+0ms

我的摇篮文件看起来是这样的:

My gradle file looks like this:

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
    }
}

我曾尝试在低端三星手机上运行姜饼,并在Gennymotion模拟器中运行2.3.7。调试后,我发现,ActiveAndroid.initialize方法内执行scanForModel方法时,应用程序挂起。

I have tried on a low-end Samsung phone running Gingerbread and also on a Gennymotion emulator running 2.3.7. After debugging I found that the app hangs when performing the scanForModel method inside the ActiveAndroid.initialize method.

在此先感谢

推荐答案

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

If you don't provide model classes manually ActiveAndroid will automatically search for it in .dex file when app starts. That can consume large amount of memory.

您在活动或在明显增加模型类。

You add model classes in Activity or in manifest.

这里更多:

How要禁用扫描模式Activeandroid

这篇关于ActiveAndroid应用autocloses姜饼上运行时,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 01:26