Italian [ Risolto ] errore CreateDetector

Xfood

Expert
Licensed User
buona domenica a tutti,
oggi con mio grande stupore, mi accorgo che su un telefono samsung a10 con android 11
non funziona piu la gestione fotocamera
da errore quando viene lanciata la sub CreateDetector
tra l'altro ho utilizzato anche l'esempio originale di Erel

il log di errore che da subito all'avvio dell'app e questo:

B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
b4xmainpage_createdetector (java line: 198)
java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:132)
    at b4a.example.b4xmainpage._createdetector(b4xmainpage.java:198)
    at b4a.example.b4xmainpage._b4xpage_created(b4xmainpage.java:57)
    at b4a.example.b4xmainpage.callSub(b4xmainpage.java:375)
    at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1069)
    at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:1040)
    at b4a.example.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:523)
    at b4a.example.b4xpagesmanager._showpage(b4xpagesmanager.java:860)
    at b4a.example.b4xpagesmanager._addpage(b4xpagesmanager.java:200)
    at b4a.example.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:207)
    at b4a.example.b4xpagesmanager._initialize(b4xpagesmanager.java:711)
    at b4a.example.main._activity_create(main.java:366)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at b4a.example.main.afterFirstLayout(main.java:105)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:83)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:246)
    at android.app.ActivityThread.main(ActivityThread.java:8625)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Caused by: com.google.android.gms.common.GooglePlayServicesMissingManifestValueException: A required meta-data tag in your app's AndroidManifest.xml does not exist.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
    at com.google.android.gms.common.GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(com.google.android.gms:play-services-basement@@18.0.2:8)
    at com.google.android.gms.common.GoogleApiAvailabilityLight.isGooglePlayServicesAvailable(com.google.android.gms:play-services-basement@@18.0.2:2)
    at com.google.android.gms.dynamite.DynamiteModule.zzf(com.google.android.gms:play-services-basement@@18.0.2:6)
    at com.google.android.gms.dynamite.DynamiteModule.zza(com.google.android.gms:play-services-basement@@18.0.2:8)
    at com.google.android.gms.dynamite.zze.zzb(com.google.android.gms:play-services-basement@@18.0.2:1)
    at com.google.android.gms.dynamite.zzk.selectModule(com.google.android.gms:play-services-basement@@18.0.2:2)
    at com.google.android.gms.dynamite.DynamiteModule.load(com.google.android.gms:play-services-basement@@18.0.2:5)
    at com.google.android.gms.internal.vision.zzt.zzd(com.google.android.gms:play-services-vision-common@@19.1.3:24)
    at com.google.android.gms.internal.vision.zzm.<init>(com.google.android.gms:play-services-vision@@20.1.3:3)
    at com.google.android.gms.vision.barcode.BarcodeDetector$Builder.build(com.google.android.gms:play-services-vision@@20.1.3:7)
    ... 25 more

qualche suggerimento?
 

Xfood

Expert
Licensed User
grazie @LucaMs
lo pensavo anche io, ma non funziona
ecco il manifest ( tra l'altro quello in dotazione all'esempio)

B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.
AddApplicationText(<meta-data
    android:name="com.google.android.gms.vision.DEPENDENCIES"
    android:value="barcode,,face" />
)
 
Top