flutter_bugly icon indicating copy to clipboard operation
flutter_bugly copied to clipboard

androidx 编译无法通过

Open zhancheng opened this issue 6 years ago • 7 comments

/Users/zhancheng/Code/haipei-flutter/android/app/src/debug/AndroidManifest.xml:13:13-64 Error:
	Attribute provider#androidx.core.content.FileProvider@authorities value=(im.weshine.haipei.fileProvider) from [:flutter_bugly] AndroidManifest.xml:13:13-64
	is also present at [com.sangcomz:FishBun:0.9.0] AndroidManifest.xml:14:13-60 value=(im.weshine.haipei.provider).
	Suggestion: add 'tools:replace="android:authorities"' to <provider> element at AndroidManifest.xml:11:9-19:20 to override.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute provider#androidx.core.content.FileProvider@authorities value=(im.weshine.haipei.fileProvider) from [:flutter_bugly] AndroidManifest.xml:13:13-64
  	is also present at [com.sangcomz:FishBun:0.9.0] AndroidManifest.xml:14:13-60 value=(im.weshine.haipei.provider).
  	Suggestion: add 'tools:replace="android:authorities"' to <provider> element at AndroidManifest.xml:11:9-19:20 to override.

能帮忙升级下FileProvider库文件吗?

zhancheng avatar Apr 29 '19 06:04 zhancheng

按报错添加对应代码

crazecoder avatar Apr 29 '19 08:04 crazecoder

@crazecoder 我觉得最好从库这边升级比较好 因为更多的用户都会用AndroidX都会遇到和我一样的问题

zhancheng avatar Apr 30 '19 07:04 zhancheng

这个错和androidx没关系

crazecoder avatar Apr 30 '19 09:04 crazecoder

@crazecoder 能给个修改的示例吗 不好意思对Android不是代码不是很熟悉 我尝试了几次都失败了

zhancheng avatar Apr 30 '19 09:04 zhancheng

https://github.com/crazecoder/open_file/blob/master/README.md

crazecoder avatar May 01 '19 05:05 crazecoder

@crazecoder 非常感谢,已经成功的跑起来了,不过有一些异常

I/zygote  ( 7135): Rejecting re-init on previously-failed class java.lang.Class<com.tencent.bugly.beta.tinker.TinkerLogger>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/tencent/tinker/lib/util/TinkerLog$TinkerLogImp;
I/zygote  ( 7135):   at void com.tencent.bugly.beta.tinker.TinkerManager.setPatchRestartOnScreenOff(boolean) (BUGLY:79)
I/zygote  ( 7135):   at void com.tencent.bugly.beta.Beta.init(android.content.Context, boolean) (BUGLY:479)
I/zygote  ( 7135):   at void com.tencent.bugly.beta.Beta.init(android.content.Context, boolean, com.tencent.bugly.BuglyStrategy) (BUGLY:594)
I/zygote  ( 7135):   at void com.tencent.bugly.b.a(android.content.Context, java.lang.String, boolean, com.tencent.bugly.BuglyStrategy) (BUGLY:170)
I/zygote  ( 7135):   at void com.tencent.bugly.Bugly.init(android.content.Context, java.lang.String, boolean, com.tencent.bugly.BuglyStrategy) (BUGLY:63)
I/zygote  ( 7135):   at void com.tencent.bugly.Bugly.init(android.content.Context, java.lang.String, boolean) (BUGLY:37)
I/zygote  ( 7135):   at void com.crazecoder.flutterbugly.FlutterBuglyPlugin.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (FlutterBuglyPlugin.java:94)
I/zygote  ( 7135):   at void io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (MethodChannel.java:201)
I/zygote  ( 7135):   at void io.flutter.view.FlutterNativeView$PlatformMessageHandlerImpl.handleMessageFromDart(java.lang.String, byte[], int) (FlutterNativeView.java:188)
I/zygote  ( 7135):   at void io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(java.lang.String, byte[], int) (FlutterJNI.java:202)
I/zygote  ( 7135):   at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
I/zygote  ( 7135):   at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:325)
I/zygote  ( 7135):   at void android.os.Looper.loop() (Looper.java:142)
I/zygote  ( 7135):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6541)
I/zygote  ( 7135):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/zygote  ( 7135):   at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240)
I/zygote  ( 7135):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767)
I/zygote  ( 7135): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.tencent.tinker.lib.util.TinkerLog$TinkerLogImp" on path: DexPathList[[zip file "/data/app/im.weshine.haipei-16Ei6B-gdtv5TfJoeKa-AQ==/base.apk"],nativeLibraryDirectories=[/data/app/im.weshine.haipei-16Ei6B-gdtv5TfJoeKa-AQ==/lib/x86, /data/app/im.weshine.haipei-16Ei6B-gdtv5TfJoeKa-AQ==/base.apk!/lib/x86, /system/lib, /vendor/lib]]
I/zygote  ( 7135):   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:93)
I/zygote  ( 7135):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
I/zygote  ( 7135):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
I/zygote  ( 7135):   at void com.tencent.bugly.beta.tinker.TinkerManager.setPatchRestartOnScreenOff(boolean) (BUGLY:79)
I/zygote  ( 7135):   at void com.tencent.bugly.beta.Beta.init(android.content.Context, boolean) (BUGLY:479)
I/zygote  ( 7135):   at void com.tencent.bugly.beta.Beta.init(android.content.Context, boolean, com.tencent.bugly.BuglyStrategy) (BUGLY:594)
I/zygote  ( 7135):   at void com.tencent.bugly.b.a(android.content.Context, java.lang.String, boolean, com.tencent.bugly.BuglyStrategy) (BUGLY:170)
I/zygote  ( 7135):   at void com.tencent.bugly.Bugly.init(android.content.Context, java.lang.String, boolean, com.tencent.bugly.BuglyStrategy) (BUGLY:63)
I/zygote  ( 7135):   at void com.tencent.bugly.Bugly.init(android.content.Context, java.lang.String, boolean) (BUGLY:37)
I/zygote  ( 7135):   at void com.crazecoder.flutterbugly.FlutterBuglyPlugin.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (FlutterBuglyPlugin.java:94)
I/zygote  ( 7135):   at void io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (MethodChannel.java:201)
I/zygote  ( 7135):   at void io.flutter.view.FlutterNativeView$PlatformMessageHandlerImpl.handleMessageFromDart(java.lang.String, byte[], int) (FlutterNativeView.java:188)
I/zygote  ( 7135):   at void io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(java.lang.String, byte[], int) (FlutterJNI.java:202)
I/zygote  ( 7135):   at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
I/zygote  ( 7135):   at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:325)
I/zygote  ( 7135):   at void android.os.Looper.loop() (Looper.java:142)
I/zygote  ( 7135):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6541)
I/zygote  ( 7135):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/zygote  ( 7135):   at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240)
I/zygote  ( 7135):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767)

zhancheng avatar May 05 '19 05:05 zhancheng

@crazecoder 非常感谢,已经成功的跑起来了,不过有一些异常

I/zygote  ( 7135): Rejecting re-init on previously-failed class java.lang.Class<com.tencent.bugly.beta.tinker.TinkerLogger>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/tencent/tinker/lib/util/TinkerLog$TinkerLogImp;
I/zygote  ( 7135):   at void com.tencent.bugly.beta.tinker.TinkerManager.setPatchRestartOnScreenOff(boolean) (BUGLY:79)
I/zygote  ( 7135):   at void com.tencent.bugly.beta.Beta.init(android.content.Context, boolean) (BUGLY:479)
I/zygote  ( 7135):   at void com.tencent.bugly.beta.Beta.init(android.content.Context, boolean, com.tencent.bugly.BuglyStrategy) (BUGLY:594)
I/zygote  ( 7135):   at void com.tencent.bugly.b.a(android.content.Context, java.lang.String, boolean, com.tencent.bugly.BuglyStrategy) (BUGLY:170)
I/zygote  ( 7135):   at void com.tencent.bugly.Bugly.init(android.content.Context, java.lang.String, boolean, com.tencent.bugly.BuglyStrategy) (BUGLY:63)
I/zygote  ( 7135):   at void com.tencent.bugly.Bugly.init(android.content.Context, java.lang.String, boolean) (BUGLY:37)
I/zygote  ( 7135):   at void com.crazecoder.flutterbugly.FlutterBuglyPlugin.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (FlutterBuglyPlugin.java:94)
I/zygote  ( 7135):   at void io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (MethodChannel.java:201)
I/zygote  ( 7135):   at void io.flutter.view.FlutterNativeView$PlatformMessageHandlerImpl.handleMessageFromDart(java.lang.String, byte[], int) (FlutterNativeView.java:188)
I/zygote  ( 7135):   at void io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(java.lang.String, byte[], int) (FlutterJNI.java:202)
I/zygote  ( 7135):   at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
I/zygote  ( 7135):   at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:325)
I/zygote  ( 7135):   at void android.os.Looper.loop() (Looper.java:142)
I/zygote  ( 7135):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6541)
I/zygote  ( 7135):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/zygote  ( 7135):   at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240)
I/zygote  ( 7135):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767)
I/zygote  ( 7135): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.tencent.tinker.lib.util.TinkerLog$TinkerLogImp" on path: DexPathList[[zip file "/data/app/im.weshine.haipei-16Ei6B-gdtv5TfJoeKa-AQ==/base.apk"],nativeLibraryDirectories=[/data/app/im.weshine.haipei-16Ei6B-gdtv5TfJoeKa-AQ==/lib/x86, /data/app/im.weshine.haipei-16Ei6B-gdtv5TfJoeKa-AQ==/base.apk!/lib/x86, /system/lib, /vendor/lib]]
I/zygote  ( 7135):   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:93)
I/zygote  ( 7135):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
I/zygote  ( 7135):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
I/zygote  ( 7135):   at void com.tencent.bugly.beta.tinker.TinkerManager.setPatchRestartOnScreenOff(boolean) (BUGLY:79)
I/zygote  ( 7135):   at void com.tencent.bugly.beta.Beta.init(android.content.Context, boolean) (BUGLY:479)
I/zygote  ( 7135):   at void com.tencent.bugly.beta.Beta.init(android.content.Context, boolean, com.tencent.bugly.BuglyStrategy) (BUGLY:594)
I/zygote  ( 7135):   at void com.tencent.bugly.b.a(android.content.Context, java.lang.String, boolean, com.tencent.bugly.BuglyStrategy) (BUGLY:170)
I/zygote  ( 7135):   at void com.tencent.bugly.Bugly.init(android.content.Context, java.lang.String, boolean, com.tencent.bugly.BuglyStrategy) (BUGLY:63)
I/zygote  ( 7135):   at void com.tencent.bugly.Bugly.init(android.content.Context, java.lang.String, boolean) (BUGLY:37)
I/zygote  ( 7135):   at void com.crazecoder.flutterbugly.FlutterBuglyPlugin.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (FlutterBuglyPlugin.java:94)
I/zygote  ( 7135):   at void io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (MethodChannel.java:201)
I/zygote  ( 7135):   at void io.flutter.view.FlutterNativeView$PlatformMessageHandlerImpl.handleMessageFromDart(java.lang.String, byte[], int) (FlutterNativeView.java:188)
I/zygote  ( 7135):   at void io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(java.lang.String, byte[], int) (FlutterJNI.java:202)
I/zygote  ( 7135):   at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
I/zygote  ( 7135):   at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:325)
I/zygote  ( 7135):   at void android.os.Looper.loop() (Looper.java:142)
I/zygote  ( 7135):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6541)
I/zygote  ( 7135):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/zygote  ( 7135):   at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240)
I/zygote  ( 7135):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767)

解决了吗? 这些错有影响吗? 我也出现这个问题了

jackTang11 avatar Aug 22 '19 03:08 jackTang11