在姜饼上运行时,ActiveAndroid应用程序会自动closures

我有一个与Android Studio和Gradle开发的应用程序。 该应用程序使用ActiveAndroid。 该应用程序完美的3.0和以上。 在姜饼装置上运行时,它只是打开,白色的屏幕,然后自动closures。 运行应用程序时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, 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 

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

我尝试过运行姜饼的低端三星手机,以及运行2.3.7的Gennymotion仿真器。 debugging后,我发现应用程序在执行ActiveAndroid.initialize方法中的scanForModel方法时挂起。

提前致谢

Solutions Collecting From Web of "在姜饼上运行时,ActiveAndroid应用程序会自动closures"

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

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

更多在这里:

如何在Activeandroid中禁用扫描模型