- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我更新了我的 Android 应用的代码以包括:
我的早期版本是在 Eclipse 中创建的,这次更新我使用的是 Android Studio。导入没有用,所以我在 Android studio 中重新创建了项目。对于主要部分,它似乎工作正常。
但是当应用程序第一次启动时,它很慢。在主屏幕显示之前,盯着白色屏幕大约需要 1.5 秒。之后,该应用程序运行良好且快速。
重新启动它,当将应用程序保存在内存中时,它会立即启动。如果您将应用程序从内存中取出,它还需要 1.5 秒(/2 秒)才能开始。
我在 Nexus 7 (2013) 和 FairPhone (Android 4.2.2) 上对其进行了测试。我不明白问题出在哪里,也许你可以帮助我。一个解决方案会很好,但即使指出原因也会有很大帮助。
App.java(扩展Application)相关代码:
@Override
public void onCreate() {
super.onCreate();
mContext = this;
Log.v("App","onCreate App - before GoogleAnalytics.getInstance(this)");
analytics = GoogleAnalytics.getInstance(this);
analytics.setLocalDispatchPeriod(1800); // every 30 minutes
tracker = analytics.newTracker("REMOVED CODE FOR STACKOVERLOW");
tracker.enableExceptionReporting(true);
// Since I do this 'by hand', enabling automatic will amount to double counting.
tracker.enableAutoActivityTracking(false);
Log.v("App", "onCreate App - after GA");
// Because it is initialized here, we don't need to put it as the application in Manifest
// This means we can use Google Analytics code referring to 'getApplication'.
ActiveAndroid.initialize(this);
Log.v("App", "onCreate App - after AA");
Gradle 文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
defaultConfig {
applicationId "com.juliushuijnk.tools.ideagrowr"
minSdkVersion 9
targetSdkVersion 22
versionCode 38
versionName "1.38"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:7.5.0'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:support-v4:22.2.1'
compile 'uk.co.ribot:easyadapter:1.4.0@aar'
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
}
登录我的 Fairphone (android 4.2.2)
07-19 14:18:24.517 18930-18930/com.juliushuijnk.tools.ideagrowr V/App﹕ onCreate App - before GoogleAnalytics.getInstance(this)
07-19 14:18:24.527 18930-18930/com.juliushuijnk.tools.ideagrowr I/dalvikvm﹕ Could not find method android.app.Notification$Builder.setLocalOnly, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
07-19 14:18:24.527 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ VFY: unable to resolve virtual method 245: Landroid/app/Notification$Builder;.setLocalOnly (Z)Landroid/app/Notification$Builder;
07-19 14:18:24.528 18930-18930/com.juliushuijnk.tools.ideagrowr I/dalvikvm﹕ DexOpt: access denied from Lcom/google/android/gms/common/GooglePlayServicesUtil; to field Landroid/app/Notification;.extras
07-19 14:18:24.528 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ VFY: unable to resolve instance field 18
07-19 14:18:24.528 18930-18930/com.juliushuijnk.tools.ideagrowr E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
07-19 14:18:24.528 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ VFY: unable to resolve check-cast 25 (Landroid/app/AppOpsManager;) in Lcom/google/android/gms/common/GooglePlayServicesUtil;
07-19 14:18:24.530 18930-18930/com.juliushuijnk.tools.ideagrowr I/dalvikvm﹕ Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzh
07-19 14:18:24.530 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ VFY: unable to resolve virtual method 553: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
07-19 14:18:24.534 18930-18930/com.juliushuijnk.tools.ideagrowr I/GAv4﹕ Google Analytics 7.5.71 is starting up. To enable debug logging on a device run:
adb shell setprop log.tag.GAv4 DEBUG
adb logcat -s GAv4
07-19 14:18:24.538 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.MainActivity
07-19 14:18:24.547 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.AllIdeasActivity
07-19 14:18:24.548 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.AllNotesActivity
07-19 14:18:24.548 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.CreateIdeaActivity
07-19 14:18:24.548 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.CreateNoteActivity
07-19 14:18:24.549 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.DeleteIdeaActivity
07-19 14:18:24.549 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.OverviewActivity
07-19 14:18:24.549 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.InfoActivity
07-19 14:18:24.550 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.EditQsetActivity
07-19 14:18:24.550 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.LikeActivity
07-19 14:18:24.550 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.MigrateDatabaseActivity
07-19 14:18:24.550 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.SettingsActivity
07-19 14:18:24.551 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.UpdateCoreActivity
07-19 14:18:24.553 18930-18930/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ Bool xml configuration name not recognized: ga_reportUncaughtExceptions
07-19 14:18:24.573 18930-18930/com.juliushuijnk.tools.ideagrowr V/App﹕ onCreate App - after GA
07-19 14:18:24.636 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/app/ActivityCompat21$SharedElementCallbackImpl; (54)
07-19 14:18:24.636 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/app/ActivityCompat21$SharedElementCallbackImpl;' failed
07-19 14:18:24.666 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/app/FragmentTransitionCompat21$1; (1697)
07-19 14:18:24.666 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/app/FragmentTransitionCompat21$1;' failed
07-19 14:18:24.667 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/app/FragmentTransitionCompat21$3; (1697)
07-19 14:18:24.667 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/app/FragmentTransitionCompat21$3;' failed
07-19 14:18:24.687 18930-18930/com.juliushuijnk.tools.ideagrowr I/dalvikvm﹕ Failed resolving Landroid/support/v4/media/TransportMediatorJellybeanMR2$1; interface 1775 'Landroid/view/ViewTreeObserver$OnWindowAttachListener;'
07-19 14:18:24.687 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/media/TransportMediatorJellybeanMR2$1;' failed
07-19 14:18:24.688 18930-18930/com.juliushuijnk.tools.ideagrowr I/dalvikvm﹕ Failed resolving Landroid/support/v4/media/TransportMediatorJellybeanMR2$2; interface 1776 'Landroid/view/ViewTreeObserver$OnWindowFocusChangeListener;'
07-19 14:18:24.688 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/media/TransportMediatorJellybeanMR2$2;' failed
07-19 14:18:24.689 18930-18930/com.juliushuijnk.tools.ideagrowr I/dalvikvm﹕ Failed resolving Landroid/support/v4/media/TransportMediatorJellybeanMR2; interface 197 'Landroid/media/RemoteControlClient$OnGetPlaybackPositionListener;'
07-19 14:18:24.689 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/media/TransportMediatorJellybeanMR2;' failed
07-19 14:18:24.690 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/media/VolumeProviderCompatApi21$1; (202)
07-19 14:18:24.690 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/media/VolumeProviderCompatApi21$1;' failed
07-19 14:18:24.705 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/media/session/MediaControllerCompatApi21$CallbackProxy; (203)
07-19 14:18:24.705 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/media/session/MediaControllerCompatApi21$CallbackProxy;' failed
07-19 14:18:24.708 18930-18930/com.juliushuijnk.tools.ideagrowr I/dalvikvm﹕ Failed resolving Landroid/support/v4/media/session/MediaSessionCompatApi18$OnPlaybackPositionUpdateListener; interface 199 'Landroid/media/RemoteControlClient$OnPlaybackPositionUpdateListener;'
07-19 14:18:24.708 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/media/session/MediaSessionCompatApi18$OnPlaybackPositionUpdateListener;' failed
07-19 14:18:24.709 18930-18930/com.juliushuijnk.tools.ideagrowr I/dalvikvm﹕ Failed resolving Landroid/support/v4/media/session/MediaSessionCompatApi19$OnMetadataUpdateListener; interface 198 'Landroid/media/RemoteControlClient$OnMetadataUpdateListener;'
07-19 14:18:24.709 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/media/session/MediaSessionCompatApi19$OnMetadataUpdateListener;' failed
07-19 14:18:24.816 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/media/session/MediaSessionCompatApi21$CallbackProxy; (207)
07-19 14:18:24.816 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/media/session/MediaSessionCompatApi21$CallbackProxy;' failed
07-19 14:18:24.823 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/print/PrintHelperKitkat$1; (264)
07-19 14:18:24.823 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/print/PrintHelperKitkat$1;' failed
07-19 14:18:24.824 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v4/print/PrintHelperKitkat$2; (264)
07-19 14:18:24.824 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/print/PrintHelperKitkat$2;' failed
07-19 14:18:24.847 18930-18930/com.juliushuijnk.tools.ideagrowr I/dalvikvm﹕ Failed resolving Landroid/support/v4/view/ViewCompatLollipop$1; interface 1754 'Landroid/view/View$OnApplyWindowInsetsListener;'
07-19 14:18:24.847 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/view/ViewCompatLollipop$1;' failed
07-19 14:18:24.867 18930-18930/com.juliushuijnk.tools.ideagrowr I/dalvikvm﹕ Failed resolving Landroid/support/v4/widget/DrawerLayoutCompatApi21$InsetsListener; interface 1754 'Landroid/view/View$OnApplyWindowInsetsListener;'
07-19 14:18:24.867 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Landroid/support/v4/widget/DrawerLayoutCompatApi21$InsetsListener;' failed
07-19 14:18:24.904 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ method Landroid/support/v7/internal/widget/ListViewCompat;.lookForSelectablePosition incorrectly overrides package-private method with same name in Landroid/widget/ListView;
07-19 14:18:25.319 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Unable to resolve superclass of Luk/co/ribot/easyadapter/BaseEasyRecyclerAdapter$RecyclerViewHolder; (1642)
07-19 14:18:25.319 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Luk/co/ribot/easyadapter/BaseEasyRecyclerAdapter$RecyclerViewHolder;' failed
07-19 14:18:25.320 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Unable to resolve superclass of Luk/co/ribot/easyadapter/BaseEasyRecyclerAdapter; (1641)
07-19 14:18:25.320 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Luk/co/ribot/easyadapter/BaseEasyRecyclerAdapter;' failed
07-19 14:18:25.680 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Unable to resolve superclass of Luk/co/ribot/easyadapter/BaseEasyRecyclerAdapter; (1641)
07-19 14:18:25.680 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Luk/co/ribot/easyadapter/BaseEasyRecyclerAdapter;' failed
07-19 14:18:25.680 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Unable to resolve superclass of Luk/co/ribot/easyadapter/EasyRecyclerAdapter; (7387)
07-19 14:18:25.680 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ Link of class 'Luk/co/ribot/easyadapter/EasyRecyclerAdapter;' failed
07-19 14:18:26.240 18930-18930/com.juliushuijnk.tools.ideagrowr V/App﹕ onCreate App - after AA
07-19 14:18:26.471 18930-18930/com.juliushuijnk.tools.ideagrowr V/App﹕ end of onCreate App
07-19 14:18:26.559 18930-18930/com.juliushuijnk.tools.ideagrowr I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
07-19 14:18:26.559 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ VFY: unable to resolve virtual method 630: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
07-19 14:18:26.560 18930-18930/com.juliushuijnk.tools.ideagrowr I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
07-19 14:18:26.560 18930-18930/com.juliushuijnk.tools.ideagrowr W/dalvikvm﹕ VFY: unable to resolve virtual method 652: Landroid/content/res/TypedArray;.getType (I)I
07-19 14:18:26.822 18930-18930/com.juliushuijnk.tools.ideagrowr V/MainActivity﹕ called onCreate MainActivity
Google Analytics 出了点问题,但这并不是导致应用启动速度变慢的主要原因。主要问题似乎是像这样的行:
Unable to resolve superclass of Landroid/support/v4/app/ActivityCompat21$SharedElementCallbackImpl; (54)
我不知道如何解决这些问题,因为其他带有此类日志消息的 StackOverflow 帖子假定它与 .jar 库有关并且在 Eclipse 上。
喜欢这里: Android - Unable to resolve superclass两者都不适用于我的问题(据我了解)。
在 Nexus 7 (2013) 上,应用程序的启动也很慢,但日志文件给出了不同的读数:
07-19 14:48:05.631 26840-26840/com.juliushuijnk.tools.ideagrowr V/App﹕ onCreate App - before GoogleAnalytics.getInstance(this)
07-19 14:48:05.640 26840-26840/com.juliushuijnk.tools.ideagrowr I/GAv4﹕ Google Analytics 7.5.71 is starting up. To enable debug logging on a device run:
adb shell setprop log.tag.GAv4 DEBUG
adb logcat -s GAv4
07-19 14:48:05.645 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.MainActivity
07-19 14:48:05.656 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.AllIdeasActivity
07-19 14:48:05.656 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.AllNotesActivity
07-19 14:48:05.656 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.CreateIdeaActivity
07-19 14:48:05.656 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.CreateNoteActivity
07-19 14:48:05.657 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.DeleteIdeaActivity
07-19 14:48:05.657 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.OverviewActivity
07-19 14:48:05.657 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.InfoActivity
07-19 14:48:05.658 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.EditQsetActivity
07-19 14:48:05.658 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.LikeActivity
07-19 14:48:05.658 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.MigrateDatabaseActivity
07-19 14:48:05.658 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.SettingsActivity
07-19 14:48:05.659 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ String xml configuration name not recognized: com.juliushuijnk.tools.ideagrowr.UpdateCoreActivity
07-19 14:48:05.659 26840-26840/com.juliushuijnk.tools.ideagrowr W/GAv4﹕ Bool xml configuration name not recognized: ga_reportUncaughtExceptions
07-19 14:48:05.689 26840-26840/com.juliushuijnk.tools.ideagrowr V/App﹕ onCreate App - after GA
07-19 14:48:06.082 26840-26840/com.juliushuijnk.tools.ideagrowr W/art﹕ Before Android 4.1, method int android.support.v7.internal.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
07-19 14:48:07.580 26840-26840/com.juliushuijnk.tools.ideagrowr I/art﹕ Rejecting re-init on previously-failed class java.lang.Class<uk.co.ribot.easyadapter.BaseEasyRecyclerAdapter$RecyclerViewHolder>
07-19 14:48:07.580 26840-26840/com.juliushuijnk.tools.ideagrowr I/art﹕ Rejecting re-init on previously-failed class java.lang.Class<uk.co.ribot.easyadapter.BaseEasyRecyclerAdapter$RecyclerViewHolder>
07-19 14:48:07.581 26840-26840/com.juliushuijnk.tools.ideagrowr I/art﹕ Rejecting re-init on previously-failed class java.lang.Class<uk.co.ribot.easyadapter.BaseEasyRecyclerAdapter>
07-19 14:48:07.581 26840-26840/com.juliushuijnk.tools.ideagrowr I/art﹕ Rejecting re-init on previously-failed class java.lang.Class<uk.co.ribot.easyadapter.BaseEasyRecyclerAdapter>
07-19 14:48:07.583 26840-26840/com.juliushuijnk.tools.ideagrowr I/art﹕ Rejecting re-init on previously-failed class java.lang.Class<uk.co.ribot.easyadapter.BaseEasyRecyclerAdapter>
07-19 14:48:07.583 26840-26840/com.juliushuijnk.tools.ideagrowr I/art﹕ Rejecting re-init on previously-failed class java.lang.Class<uk.co.ribot.easyadapter.EasyRecyclerAdapter>
07-19 14:48:07.583 26840-26840/com.juliushuijnk.tools.ideagrowr I/art﹕ Rejecting re-init on previously-failed class java.lang.Class<uk.co.ribot.easyadapter.EasyRecyclerAdapter>
07-19 14:48:07.592 26840-26840/com.juliushuijnk.tools.ideagrowr V/App﹕ onCreate App - after AA
07-19 14:48:07.606 26840-26840/com.juliushuijnk.tools.ideagrowr V/App﹕ end of onCreate App
07-19 14:48:07.690 26840-26840/com.juliushuijnk.tools.ideagrowr V/MainActivity﹕ called onCreate MainActivity
虽然大部分内容我都没有完全理解,但我认为这是最奇怪的一行:
Before Android 4.1, method int android.support.v7.internal.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
如果有帮助, list 文件的开头:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.juliushuijnk.tools.ideagrowr"
android:installLocation="auto" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name=".App"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.myTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
进一步的背景:我不是专业的软件开发人员,这是一个宠物项目。学习如何解决这样的问题也很棒。
最佳答案
我自己想通了。所以最后,这是由于我如何实现 ActiveAndroid 库。
除非您使用有助于 AA 快速找到模型的配置,否则它只会让您的应用启动非常慢。
我用这段代码修复了它: How to disable scanning for model in Activeandroid
这样的代码(但我有不同的型号名称):
Configuration.Builder configurationBuilder = new Configuration.Builder(this);
configurationBuilder.addModelClasses(Test.class);
configurationBuilder.addModelClasses(ShoppingList.class);
configurationBuilder.addModelClasses(ShoppingListItem.class);
configurationBuilder.addModelClasses(ArticleInfoModel.class);
ActiveAndroid.initialize(configurationBuilder.create());
现在几乎是即时启动。我仍然不确定为什么我会收到所有这些奇怪的 logcat 条目。所有“无法解析父类(super class)”可能是 AA 在没有配置的情况下如何运行的某种间接产物。自从我添加配置后,这些行现在消失了。
这些 logcat 行让我在寻找与 gradle 和支持库有关的答案时感到困惑,但这不是问题的根源。
所以我应该从一开始就实现该配置。但它在 AA 的写作方式让人感觉“拥有它很高兴”。
https://github.com/pardom/ActiveAndroid/wiki/Creating-your-database-mode
所以我了解到,下次当我看到一些我认为“很高兴拥有”的东西时,我应该在评论中写下我的假设,这样我就可以在遇到问题时快速了解我可能需要更改的地方。 .
感谢 Danielson 的帮助:)。
关于java - Android 应用程序启动缓慢,但启动缓慢后运行良好,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31501650/
好的,所以我想从批处理文件运行我的整个工作环境... 我想要实现什么...... 打开新的 powershell,打开我的 API 文件夹并从该文件夹运行 VS Code 编辑器(cd c:\xy;
我正在查看 Cocoa Controls 上的示例并下载了一些演示。我遇到的问题是一些例子,比如 BCTabBarController ,不会在我的设备上构建或启动。当我打开项目时,它看起来很正常,没
我刚刚开始学习 C 语言(擅长 Java 和 Python)。 当编写 C 程序(例如 hello world)时,我在 ubuntu cmd 行上使用 gcc hello.c -o hello 编译
我在 php 脚本从 cron 开始运行到超时后注意到了这个问题,但是当它从命令行手动运行时这不是问题。 (对于 CLI,PHP 默认的 max_execution_time 是 0) 所以我尝试运行
我可以使用命令行运行测试 > ./node_modules/.bin/wdio wdio.conf.js 但是如果我尝试从 IntelliJ 的运行/调试配置运行它,我会遇到各种不同的错误。 Fea
Error occurred during initialization of VM. Could not reserve enough space for object heap. Error: C
将 Anaconda 安装到 C:\ 后,我无法打开 jupyter 笔记本。无论是在带有 jupyter notebook 的 Anaconda Prompt 中还是在导航器中。我就是无法让它工作。
我遇到一个问题,如果我双击我的脚本 (.py),或者使用 IDLE 打开它,它将正确编译并运行。但是,如果我尝试在 Windows 命令行中运行脚本,请使用 C:\> "C:\Software_Dev
情况 我正在使用 mysql 数据库。查询从 phpmyadmin 和 postman 运行 但是当我从 android 发送请求时(它返回零行) 我已经记录了从 android 发送的电子邮件是正确
所以这个有点奇怪 - 为什么从 Java 运行 .exe 文件会给出不同的输出而不是直接运行 .exe。 当 java 在下面的行执行时,它会调用我构建的可与 3CX 电话系统配合使用的 .exe 文
这行代码 Environment.Is64BitProcess 当我的应用单独运行时评估为真。 但是当它在我的 Visual Studio 单元测试中运行时,相同的表达式的计算结果为 false。 我
关闭。这个问题是opinion-based .它目前不接受答案。 想要改进这个问题? 更新问题,以便 editing this post 可以用事实和引用来回答它. 关闭 8 年前。 Improve
我写了一个使用 libpq 连接到 PostgreSQL 数据库的演示。 我尝试通过包含将 C 文件连接到 PostgreSQL #include 在我将路径添加到系统变量 I:\Program F
如何从 Jenkins 运行 Android 模拟器来运行我的测试?当我在 Execiute Windows bath 命令中写入时,运行模拟器的命令: emulator -avd Tester 然后
我已经配置好东西,这样我就可以使用 ssl 登录和访问在 nginx 上运行的 errbit 我的问题是我不知道如何设置我的 Rails 应用程序的 errbit.rb 以便我可以运行测试 nginx
我编写了 flutter 应用程序,我通过 xcode 打开了 ios 部分并且应用程序正在运行,但是当我通过 flutter build ios 通过 vscode 运行应用程序时,我得到了这个错误
我有一个简短的 python 脚本,它使用日志记录模块和 configparser 模块。我在Win7下使用PyCharm 2.7.1和Python 3.3。 当我使用 PyCharm 运行我的脚本时
我在这里遇到了一些难题。 我的开发箱是 64 位的,windows 7。我所有的项目都编译为“任何 CPU”。该项目引用了 64 位版本的第 3 方软件 当我运行不使用任何 Web 引用的单元测试时,
当我注意到以下问题时,我正在做一些 C++ 练习。给定的代码将不会在 Visual Studio 2013 或 Qt Creator 5.4.1 中运行/编译 报错: invalid types 'd
假设我有一个 easteregg.py 文件: from airflow import DAG from dateutil import parser from datetime import tim
我是一名优秀的程序员,十分优秀!