我正在开发一个Android应用程序,它开始很晚。
04-16 18:07:09.834 2683-2683/pp.com.dersProgramim W/ResourceType: Found multiple library tables, ignoring...
04-16 18:07:23.159 2683-2683/pp.com.dersProgramim D/NotificationMan...: Step 1
这是首次运行的logcat。它在“找到多个库表,忽略”部分等待了很长时间。它就像12秒钟。
第一次运行后,app会生成大容量缓存和数据,例如30 MB。 App Info
我认为它太大了。
第二次运行,例如,应用程序在“找到多个库表,忽略......”部分再次打开,它等待,但不是第一次运行,它是15毫秒。
这是build.gradle文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "pp.com.dersProgramim"
minSdkVersion 14
targetSdkVersion 23
versionCode 10
versionName "2.0.1"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile project(':BetterPickers')
compile project(':MaterialDesign')
compile project(':UpdateChecker')
compile 'com.google.android.gms:play-services:6.+'
compile 'com.balysv.materialmenu:material-menu-toolbar:1.5.1'
compile 'de.cketti.library.changelog:ckchangelog:1.2.2'
compile('com.afollestad.material-dialogs:core:0.8.5.1@aar') {
transitive = true
}
compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.prolificinteractive:material-calendarview:1.1.0'
}
manifest.xml文件
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="pp.com.dersProgramim">
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application android:allowBackup="true" android:label="@string/app_name"
android:name=".MySchoolSchedule"
android:icon="@mipmap/ic_launcher" android:supportsRtl="true"
android:theme="@style/DersProgramimTheme">
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:exported="true"
android:theme="@style/DersProgramimTheme"
android:configChanges="orientation|screenSize|touchscreen"
android:windowSoftInputMode="stateUnchanged|stateHidden|adjustPan" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SetSchuleTimeConfigurationActivity"
android:label="@string/app_name"
android:theme="@style/DersProgramimTheme"
android:configChanges="orientation|screenSize|touchscreen"
android:windowSoftInputMode="stateUnchanged|stateHidden|adjustPan"/>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:theme="@android:style/Theme.Translucent"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<receiver android:name=".StartReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service android:name=".NotificationService" />
</application>
</manifest>
和其他模块的build.gradle文件
buildscript {
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0-beta1'
}
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
apply plugin: 'android-library'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 10
targetSdkVersion 23
versionName "1"
versionCode 1
}
buildTypes {
release {
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:23.0.1'
compile('com.afollestad.material-dialogs:core:0.8.5.1@aar') {
transitive = true
}
}
另一个
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:support-v4:23.+'
compile 'com.nineoldandroids:library:2.4.0'
compile fileTree(dir: 'libs', include: '*.jar')
}
这是最后一次
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 11
targetSdkVersion 23
versionCode 10
versionName "1.5.5"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
assets {
srcDir 'assets'
}
}
}
lintOptions {
abortOnError false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:23.0.1'
compile 'org.jraf:android-switch-backport:1.4.0@aar'
compile 'com.nineoldandroids:library:2.4.0'
}
感谢您的帮助。
答案 0 :(得分:0)
但是当我构建一个已发布的apk时问题就解决了。 也许你可以尝试构建一个已发布的apk。 我想调试apk可能存在一些问题。