I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" on path: DexPathList[[zip file "/data/app/com.omnisoft.vpndot-9oJauvaJ5BkLPB51S-hXAw==/base.apk"],nativeLibraryDirectories=[/data/app/com.omnisoft.vpndot-9oJauvaJ5BkLPB51S-hXAw==/lib/arm64, /system/lib64, /product/lib64]]
not sure if any of this will help, but
your android.support.v4.content.FileProvider seems to have been replaced by androidx.core.content.FileProvider
an .aar is available from maven
the FileProvider class is in there and is looking for a lot of things. am attaching the full source for the fileprovider class only. if it can be built alone, you'll have your class.
i'm working on another project which is looking for many of the same imports. you have to find them first, and even then they depend on even more stuff.
"A little kindness - as little as required by applicable law."
"It can't hurt to read the thread before replying."
"Show code; code always does what you tell it to do, not always what you tell us it does."
"building a class" is getting beyond my lower-level knowledge of android.
So, please don't spend a lot of time for a solution just for me.
But if your work on your other project allows for an easy solution for my issue, then that would be great
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
"A little kindness - as little as required by applicable law."
"It can't hurt to read the thread before replying."
"Show code; code always does what you tell it to do, not always what you tell us it does."
<provider
android:name="b4a.tinyfileprovider.igolub.B4AFileProvider"
android:authorities="$PACKAGE$.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
CreateResource(xml, provider_paths,
<files-path name="name" path="shared" />
FATAL EXCEPTION: main
Process: com.mycompany.myapp, PID: 11631
java.lang.RuntimeException: Unable to get provider b4a.tinyfileprovider.igolub.B4AFileProvider: java.lang.ClassNotFoundException: Didn't find class "b4a.tinyfileprovider.igolub.B4AFileProvider" on path: DexPathList[[zip file "/data/app/com.mycompany.myapp-S_hdK65qQLVXHYzPxhY2MA==/base.apk"],nativeLibraryDirectories=[/data/app/com.mycompany.myapp-S_hdK65qQLVXHYzPxhY2MA==/lib/arm64, /system/lib64, /product/lib64]]
at android.app.ActivityThread.installProvider(ActivityThread.java:6988)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6528)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6445)
at EdHooker_42b8453bf7df105343083f1377c32094be493c49.hook(Unknown Source:120)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.ClassNotFoundException: Didn't find class "b4a.tinyfileprovider.igolub.B4AFileProvider" on path: DexPathList[[zip file "/data/app/com.mycompany.myapp-S_hdK65qQLVXHYzPxhY2MA==/base.apk"],nativeLibraryDirectories=[/data/app/com.mycompany.myapp-S_hdK65qQLVXHYzPxhY2MA==/lib/arm64, /system/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:147)
at android.app.ActivityThread.installProvider(ActivityThread.java:6972)
... 11 more
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
FATAL EXCEPTION: main
Process: com.mycompany.myapp, PID: 11631
java.lang.RuntimeException: Unable to get provider b4a.tinyfileprovider.igolub.B4AFileProvider: java.lang.ClassNotFoundException: Didn't find class "b4a.tinyfileprovider.igolub.B4AFileProvider" on path: DexPathList[[zip file "/data/app/com.mycompany.myapp-S_hdK65qQLVXHYzPxhY2MA==/base.apk"],nativeLibraryDirectories=[/data/app/com.mycompany.myapp-S_hdK65qQLVXHYzPxhY2MA==/lib/arm64, /system/lib64, /product/lib64]]
at android.app.ActivityThread.installProvider(ActivityThread.java:6988)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6528)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6445)
at EdHooker_42b8453bf7df105343083f1377c32094be493c49.hook(Unknown Source:120)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.ClassNotFoundException: Didn't find class "b4a.tinyfileprovider.igolub.B4AFileProvider" on path: DexPathList[[zip file "/data/app/com.mycompany.myapp-S_hdK65qQLVXHYzPxhY2MA==/base.apk"],nativeLibraryDirectories=[/data/app/com.mycompany.myapp-S_hdK65qQLVXHYzPxhY2MA==/lib/arm64, /system/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:147)
at android.app.ActivityThread.installProvider(ActivityThread.java:6972)
... 11 more
My Bad, I forgot to include your new lib in the project (normally I would get a compile error reminding me to do that).
So, it compiled OK now - I will test it now....
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
If UseFileProvider = False Then
Dim uri As JavaObject
Return uri.InitializeStatic("android.net.Uri").RunMethod("parse", Array("file://" & File.Combine(SharedFolder, FileName)))
Dim f As JavaObject
f.InitializeNewInstance("java.io.File", Array(SharedFolder, FileName))
Dim fp As JavaObject
Dim context As JavaObject
context.InitializeContext
'fp.InitializeStatic("android.support.v4.content.FileProvider")
fp.InitializeStatic("b4a.tinyfileprovider.igolub.B4AFileProvider") '<-------- changed to new class name
Return fp.RunMethod("getUriForFile", Array(context, Application.PackageName & ".provider", f))
End If
End Sub
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
If UseFileProvider = False Then
Dim uri As JavaObject
Return uri.InitializeStatic("android.net.Uri").RunMethod("parse", Array("file://" & File.Combine(SharedFolder, FileName)))
Dim f As JavaObject
f.InitializeNewInstance("java.io.File", Array(SharedFolder, FileName))
Dim fp As JavaObject
Dim context As JavaObject
context.InitializeContext
'fp.InitializeStatic("android.support.v4.content.FileProvider")
fp.InitializeStatic("b4a.tinyfileprovider.igolub.B4AFileProvider") '<-------- changed to new class name
Return fp.RunMethod("getUriForFile", Array(context, Application.PackageName & ".provider", f))
End If
End Sub
You didn't fully read my post. You don't need an additional file provider. Delete the file provider class and just use TinyFileProvider. It contains all the methods from the FileProvider class...
Dim tp As TinyFileProvider
tp.GetFileUri(.....)
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…