- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 Android P 并针对 AndroidX 进行编译。在调试/测试版中工作得很好,但是当我发布版本时,我在运行时遇到了神秘的崩溃:
2018-06-24 00:21:26.080 11971-11971/? E/LoadedApk: Unable to instantiate appComponentFactory java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[[zip file "/data/app/app.itsyour.elegantstocks-EuVZWdDgzplhm0Hpa90VwA==/base.apk"],nativeLibraryDirectories=[/data/app/app.itsyour.elegantstocks-EuVZWdDgzplhm0Hpa90VwA==/lib/x86, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:126) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at android.app.LoadedApk.createAppFactory(LoadedApk.java:226) at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:731) at android.app.LoadedApk.getClassLoader(LoadedApk.java:772) at android.app.LoadedApk.getResources(LoadedApk.java:994) at android.app.ContextImpl.createAppContext(ContextImpl.java:2345) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5736) at android.app.ActivityThread.access$1000(ActivityThread.java:197) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1634) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6642) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 2018-06-24 00:21:26.145 1667-1854/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property 2018-06-24 00:21:26.233 1667-1703/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property 2018-06-24 00:21:29.627 1796-1913/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?). 2018-06-24 00:21:30.087 11971-11971/? E/AndroidRuntime: FATAL EXCEPTION: main Process: app.itsyour.elegantstocks, PID: 11971 java.lang.IllegalArgumentException: Parameter specified as non-null is null: method c.d.b.h.b, parameter $receiver at app.itsyour.elegantstocks.a.b.a(Unknown Source:2) at app.itsyour.elegantstocks.feature.navigator.b.a$a.a(Unknown Source:24) at app.itsyour.elegantstocks.feature.navigator.b.a.a(Unknown Source:13) at app.itsyour.elegantstocks.feature.navigator.b.a.a(Unknown Source:2) at androidx.recyclerview.widget.RecyclerView$a.a(Unknown Source:0) at androidx.recyclerview.widget.RecyclerView$a.b(Unknown Source:29) at androidx.recyclerview.widget.RecyclerView$p.a(Unknown Source:39) at androidx.recyclerview.widget.RecyclerView$p.a(Unknown Source:510) at androidx.recyclerview.widget.RecyclerView$p.a(Unknown Source:5) at androidx.recyclerview.widget.RecyclerView$p.c(Unknown Source:1) at androidx.recyclerview.widget.LinearLayoutManager$c.a(Unknown Source:11) at androidx.recyclerview.widget.LinearLayoutManager.a(Unknown Source:0) at androidx.recyclerview.widget.LinearLayoutManager.a(Unknown Source:44) at androidx.recyclerview.widget.LinearLayoutManager.c(Unknown Source:371) at androidx.recyclerview.widget.RecyclerView.O(Unknown Source:42) at androidx.recyclerview.widget.RecyclerView.q(Unknown Source:41) at androidx.recyclerview.widget.RecyclerView.onLayout(Unknown Source:5) at android.view.View.layout(View.java:20670) at android.view.ViewGroup.layout(ViewGroup.java:6194) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:20670) at android.view.ViewGroup.layout(ViewGroup.java:6194) at androidx.constraintlayout.widget.ConstraintLayout.onLayout(Unknown Source:66) at android.view.View.layout(View.java:20670) at android.view.ViewGroup.layout(ViewGroup.java:6194) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:20670) at android.view.ViewGroup.layout(ViewGroup.java:6194) at androidx.swiperefreshlayout.widget.SwipeRefreshLayout.onLayout(Unknown Source:60) at android.view.View.layout(View.java:20670) at android.view.ViewGroup.layout(ViewGroup.java:6194) at androidx.coordinatorlayout.widget.CoordinatorLayout.d(Unknown Source:143) at androidx.coordinatorlayout.widget.CoordinatorLayout.a(Unknown Source:32) at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(Unknown Source:48) at android.view.View.layout(View.java:20670) at android.view.ViewGroup.layout(ViewGroup.java:6194) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:20670) at android.view.ViewGroup.layout(ViewGroup.java:6194) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656) at android.widget.LinearLayout.onLayout(LinearLayout.java:1565) at android.view.View.layout(View.java:20670) at android.view.ViewGroup.layout(ViewGroup.java:6194) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:20670) at android.view.ViewGroup.layout(ViewGroup.java:6194) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656) at android.widget.LinearLayout.onLayout(LinearLayout.java:1565) at android.view.View.layout(View.java:20670) at android.view.ViewGroup.layout(ViewGroup.java:6194) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout(DecorView.java:753) at android.view.View.layout(View.java:20670) 2018-06-24 00:21:30.087 11971-11971/? E/AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6194) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2767) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2294) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1447) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7130) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:935) at android.view.Choreographer.doCallbacks(Choreographer.java:747) at android.view.Choreographer.doFrame(Choreographer.java:682) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:921) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6642) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 2018-06-24 00:21:30.137 1796-1880/? E/InputDispatcher: channel '5896582 app.itsyour.elegantstocks/app.itsyour.elegantstocks.feature.navigator.NavigatorActivity (server)' ~ Channel is unrecoverably broken and will be disposed! 2018-06-24 00:21:30.253 5198-9377/? E/EntrySyncManager: Cannot determine account name: drop request 2018-06-24 00:21:30.253 5198-9377/? E/NowController: Failed to access data from EntryProvider. ExecutionException. java.util.concurrent.ExecutionException: com.google.android.apps.gsa.sidekick.main.h.n: Could not complete scheduled request to refresh entries. ClientErrorCode: 3 at com.google.common.util.concurrent.d.eA(SourceFile:85) at com.google.common.util.concurrent.d.get(SourceFile:23) at com.google.common.util.concurrent.l.get(SourceFile:2) at com.google.android.apps.gsa.staticplugins.nowstream.b.a.be.caI(SourceFile:47) at com.google.android.apps.gsa.staticplugins.nowstream.b.a.be.caH(SourceFile:176) at com.google.android.apps.gsa.staticplugins.nowstream.b.a.bh.run(Unknown Source:2) at com.google.android.apps.gsa.shared.util.concurrent.at.run(SourceFile:4) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.google.android.apps.gsa.shared.util.concurrent.b.g.run(Unknown Source:4) at com.google.android.apps.gsa.shared.util.concurrent.b.aw.run(SourceFile:4) at com.google.android.apps.gsa.shared.util.concurrent.b.aw.run(SourceFile:4) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764) at com.google.android.apps.gsa.shared.util.concurrent.b.i.run(SourceFile:6) Caused by: com.google.android.apps.gsa.sidekick.main.h.n: Could not complete scheduled request to refresh entries. ClientErrorCode: 3 at com.google.android.apps.gsa.staticplugins.nowstream.b.a.aq.az(Unknown Source:4) at com.google.common.util.concurrent.q.ap(SourceFile:7) at com.google.common.util.concurrent.p.run(SourceFile:32) at com.google.common.util.concurrent.bt.execute(SourceFile:3) at com.google.common.util.concurrent.d.b(SourceFile:275) at com.google.common.util.concurrent.d.addListener(SourceFile:135) at com.google.common.util.concurrent.p.b(SourceFile:3) at com.google.android.apps.gsa.shared.util.concurrent.h.a(SourceFile:16) at com.google.android.apps.gsa.shared.util.concurrent.h.a(SourceFile:13) at com.google.android.apps.gsa.staticplugins.nowstream.b.a.be.caI(SourceFile:45) at com.google.android.apps.gsa.staticplugins.nowstream.b.a.be.caH(SourceFile:176) at com.google.android.apps.gsa.staticplugins.nowstream.b.a.bh.run(Unknown Source:2) at com.google.android.apps.gsa.shared.util.concurrent.at.run(SourceFile:4) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.google.android.apps.gsa.shared.util.concurrent.b.g.run(Unknown Source:4) at com.google.android.apps.gsa.shared.util.concurrent.b.aw.run(SourceFile:4) at com.google.android.apps.gsa.shared.util.concurrent.b.aw.run(SourceFile:4) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764) at com.google.android.apps.gsa.shared.util.concurrent.b.i.run(SourceFile:6)
我的 gradle 文件。项目等级:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
ext {
androidXVersion = '1.0.0-alpha3'
supportLibraryVersion = '28.0.0-alpha1'
}
buildscript {
ext.kotlin_version = '1.2.50'
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-beta01'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects
{
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
应用程序等级:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
def versionMajor = 1
def versionMinor = 0
def versionPatch = project.hasProperty('buildNumber') ? project.getProperties().get('buildNumber').toInteger() : 0
android {
compileSdkVersion 28
defaultConfig {
applicationId "app.itsyour.elegantstocks"
minSdkVersion 25
targetSdkVersion 28
// Version
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
versionCode versionMajor * 1000000 * versionMinor * 10000 + versionPatch
resValue "string", "build_number", "Version ${versionName}"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas".toString())
}
}
}
buildTypes {
release {
resValue "string", "app_name", "Elegant Stocks"
signingConfig signingConfigs.release
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-release.pro'
}
staging {
resValue "string", "app_name", "Elegant Stocks"
signingConfig signingConfigs.staging
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-staging.pro'
}
beta {
signingConfig signingConfigs.beta
debuggable true
minifyEnabled false
applicationIdSuffix ".beta"
versionNameSuffix "-BETA"
resValue "string", "app_name", "Elegant Stocks Beta"
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-beta.pro'
}
debug {
debuggable true
minifyEnabled false
resValue "string", "app_name", "Elegant Stocks Debug"
applicationIdSuffix ".debug"
versionNameSuffix = "-DEBUG"
}
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
testOptions {
unitTests {
includeAndroidResources = true
all {
testLogging {
events "passed", "failed", "skipped"
}
}
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.appcompat:appcompat:$androidXVersion"
implementation "androidx.fragment:fragment-ktx:$androidXVersion"
implementation "com.google.android.material:material:$androidXVersion"
implementation "androidx.recyclerview:recyclerview:$androidXVersion"
implementation "androidx.core:core-ktx:$androidXVersion"
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
// Dagger 2
implementation 'com.google.dagger:dagger:2.16'
implementation 'com.google.dagger:dagger-android:2.16'
implementation 'com.google.dagger:dagger-android-support:2.16'
kapt 'com.google.dagger:dagger-compiler:2.16'
kapt 'com.google.dagger:dagger-android-processor:2.16'
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
// Stetho
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
// Rx
implementation 'io.reactivex.rxjava2:rxjava:2.1.13'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxkotlin:2.2.0'
implementation 'com.jakewharton.rxbinding2:rxbinding-kotlin:2.1.1'
implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7-kotlin:2.1.1'
implementation 'com.jakewharton.rx2:replaying-share:2.0.1'
// Room
implementation "androidx.room:room-runtime:2.0.0-alpha1"
implementation "androidx.room:room-rxjava2:2.0.0-alpha1"
kapt "androidx.room:room-compiler:2.0.0-alpha1"
// Logging
implementation 'com.jakewharton.timber:timber:4.7.0'
// Time
implementation 'com.jakewharton.threetenabp:threetenabp:1.1.0'
// UI
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation 'net.opacapp:multiline-collapsingtoolbar:27.1.1'
implementation 'com.balysv:material-ripple:1.0.2'
// Testing
androidTestImplementation "com.android.support.test:runner:1.0.2"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha3'
testImplementation 'junit:junit:4.12'
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:${kotlin_version}"
testImplementation "com.nhaarman:mockito-kotlin-kt1.1:1.5.0"
testImplementation "org.mockito:mockito-core:2.18.3"
testImplementation "org.robolectric:robolectric:3.8"
testImplementation "org.robolectric:shadows-multidex:3.8"
}
Proguard:
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn okhttp3.**
-dontwarn okio.**
-dontwarn org.codehaus.mojo.animal_sniffer.**
-dontwarn javax.annotation.**
-dontwarn org.conscrypt.**
最佳答案
添加-keep class androidx.core.app.CoreComponentFactory { *; }
添加到你的 proguard 配置中,这样该类就不会被 proguarded out
关于关于 appComponentFactory,AndroidX 构建在 Release模式下失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51006967/
在我的项目中更新了一些package.json依赖项之后,我开始看到有关合并的application@appComponentFactory中AndroidManifest.xml属性重复条目的错误:
我正在 Android Studio 中开发一个 Android 应用程序,我正在努力显示我的新 fragment 。在 logcat 中,我看到一个错误,但我不确定它是什么意思,也无法在其他任何地方
我正在使用 Android P 并针对 AndroidX 进行编译。在调试/测试版中工作得很好,但是当我发布版本时,我在运行时遇到了神秘的崩溃: 2018-06-24 00:21:26.080 119
这个问题已经有答案了: Android Material and appcompat Manifest merger failed (35 个回答) 已关闭 4 年前。 使用 Google 所谓的 M
在我添加 tools:replace="android:appComponentFactory在我的 Manifest.xml 中它使发生错误 Manifest merger failed: Attr
我有一个 ionic 1 项目,我使用此命令使用 Android Studio 3.1.3 构建 Android 平台“cordova platform add Android@6.4.0”但是我有这
这个问题在这里已经有了答案: Android Material and appcompat Manifest merger failed (35 个回答) 关闭3年前。 使用谷歌所谓的 Materia
当我尝试运行应用程序时,我收到以下错误。我该怎么做才能解决这个问题? Attribute application@appComponentFactory value=(android.support.
This question already has answers here: Manifest merger failed : Attribute application@appComponentF
我没有找到解决这个问题的方法,实际上错误在 AndroidManifest.xml android:appComponentFactory="android.support.v4.app.CoreCo
我正在尝试实现 Iconics 库,但遇到此错误。 Manifest merger failed : Attribute application@appComponentFactory value=(
一切都很好,但我正在尝试添加这个库 https://github.com/wdullaer/MaterialDateTimePicker有了这个 implementation 'com.wdullae
我使用 google material design 作为 https://material.io/develop/android/docs/getting-started/但是当同步项目时我有以下错
我还是 Android 应用程序的初学者,因此当我尝试构建此应用程序时,我在日志中收到以下错误: Manifest merger failed : Attribute application@appC
当我使用 androidx 构建 Gradle 时,出现以下错误。请帮我解决这个问题。 Error Message: Manifest merger failed : Attribute applic
当我尝试运行我的应用程序并从 Google 加载 map 以显示附近地点时,它会显示 map 而不是地点。我一直在 Stackoverflow 上搜索,但没有找到有效的解决方案... 这是我错误的一部
该应用程序在iOS上构建时没有问题(一些警告,已弃用的东西等),但是在android上我无法构建该应用程序,并且出现以下错误: android / app / build / intermedia
当我使用 androidx 构建 Gradle 时,出现以下错误。请帮我解决这个问题。 Error Message: Manifest merger failed : Attribute applic
这个问题已经有答案了: Manifest merger failed : Attribute application@appComponentFactory - Androidx (14 个回答) 已
我是 Android 新手,并且有一个应用程序在构建我的项目时出现此错误:: ERROR: Manifest merger failed : Attribute application@appComp
我是一名优秀的程序员,十分优秀!