阿里云OpenAPI 这个看下呢?
直接用java的demo来跑是可以运行成功的,但是结合flutter使用就出现以上报错,文件是能获取到的;
I/System.out( 7627): 传递的参数是 filePathA = /data/user/0/com.example.java_demo/cache/CAP1215746863773229303.jpg
I/System.out( 7627): 传递的参数是 filePathB = /data/user/0/com.example.java_demo/cache/CAP1215746863773229303.jpg
W/System.err( 7627): SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
W/System.err( 7627): SLF4J: Defaulting to no-operation (NOP) logger implementation
W/System.err( 7627): SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
W/ample.java_demo( 7627): Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (unsupported,core-platform-api, reflection, allowed)
W/ample.java_demo( 7627): Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (unsupported,core-platform-api, reflection, allowed)
W/ample.java_demo( 7627): Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (unsupported,core-platform-api, reflection, allowed)
D/TrafficStats( 7627): tagSocket(187) with statsTag=0xffffffff, statsUid=-1
I/System.out( 7627): [com.mediatek.cta.CtaAdapter]:check permission begin!
W/System ( 7627): ClassLoader referenced unknown path: system/framework/mediatek-cta.jar
I/System.out( 7627): [com.mediatek.cta.CtaAdapter] e:java.lang.ClassNotFoundException: com.mediatek.cta.CtaUtils
W/System.err( 7627): com.aliyun.tea.TeaUnretryableException
W/System.err( 7627): at com.aliyun.oss.Client.postObject(Client.java:5422)
W/System.err( 7627): at com.aliyun.facebody20191230.Client.compareFaceAdvance(Client.java:915)
W/System.err( 7627): at com.example.java_demo.MainActivity.getPhoto(MainActivity.java:109)
W/System.err( 7627): at com.example.java_demo.MainActivity$2.onMethodCall(MainActivity.java:50)
W/System.err( 7627): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
W/System.err( 7627): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
W/System.err( 7627): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
W/System.err( 7627): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
W/System.err( 7627): at android.os.Handler.handleCallback(Handler.java:942)
W/System.err( 7627): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 7627): at android.os.Looper.loopOnce(Looper.java:210)
W/System.err( 7627): at android.os.Looper.loop(Looper.java:299)
W/System.err( 7627): at android.app.ActivityThread.main(ActivityThread.java:8136)
W/System.err( 7627): at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 7627): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
W/System.err( 7627): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028)
报错说的是安卓 安卓有两个问题
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。