So i'm trying to implement dynamic module. I just have one fragment in the dynamic module i.e upon clicking on that fragment, it downloads the module and installs and then it is showed to the user. So far the application is downloading and installing the module. But it crashes upon loading the module. It throws following error
29-05-2022 20:05:02 : android.content.res.Resources$NotFoundException: Resource ID #0x7d020000
--------- Stack trace ---------
android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:237)
android.content.res.Resources.loadXmlResourceParser(Resources.java:2400)
android.content.res.Resources.getLayout(Resources.java:1252)
android.view.LayoutInflater.inflate(LayoutInflater.java:530)
com.healtharx.ondemand.OnDemandFragment.onCreateView(OnDemandFragment.kt:16)
androidx.fragment.app.Fragment.performCreateView(Fragment.java:2963)
androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:518)
androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282)
androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
If i run the application from android studio where it obviously downloads and installs all modules, the application runs fine. But when i upload the application to playstore for internal testing, it downloads and installs the module and throws the above error. What am i missing? Also if anyone can share good online resource which can help me implement dynamic module easily it would really be appreciated. Thanks
Related
Here's what my modules look like
I changed my module name in Android Studio from app to wear, after I decided to add another module called mobile. I didn't see any issues until my app update got rejected from Play Store.
The Logcat is filled with this error :
E checkOperation
java.lang.SecurityException: Specified package com.wrejistry.voicerecorder under uid 10332 but it is really 10335
at com.android.server.appop.AppOpsService.verifyAndGetBypass(AppOpsService.java:3944)
at com.android.server.appop.AppOpsService.checkOperationUnchecked(AppOpsService.java:2928)
at com.android.server.appop.AppOpsService.checkOperationImpl(AppOpsService.java:2911)
at com.android.server.appop.AppOpsService.checkOperationInternal(AppOpsService.java:2898)
at com.android.server.appop.AppOpsService.checkOperation(AppOpsService.java:2889)
at com.android.internal.app.IAppOpsService$Stub.onTransact(IAppOpsService.java:425)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)
Is it safe to add a new module for a phone app to my existing project? Did the error occur because I added a new module or is it because I renamed the "app" module to "wear". How do I prevent this issue and make sure the device recognizes my app signature the same as before I changed the module name.
We are developing an app that has a feature translation. We want to implement a translation feature on-demand using com.google.mlkit:playstore-dynamic-feature-support:16.0.0-beta2 with google MLkit com.google.mlkit:translate:17.0.0
It is working perfectly on debug build. It has also worked on the release build after the on-demand dynamic feature installation was done until the app forcefully stopped. After the app stopped forcefully and open again that time on-demand feature doesn't work and threw an exception like resource not found exception.
Here is the exception message:
android.content.res.Resources$NotFoundException: Resource ID #0x7e030000
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:292)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2390)
at android.content.res.Resources.getXml(Resources.java:1392)
at com.google.android.gms.internal.mlkit_translate.zzpi.zza(com.google.mlkit:translate##17.0.0:4)
at com.google.android.gms.internal.mlkit_translate.zzpp.zzi(com.google.mlkit:translate##17.0.0:1)
at com.google.mlkit.nl.translate.internal.zzad.<init>(com.google.mlkit:translate##17.0.0:1)
at com.google.mlkit.nl.translate.zzg.create(com.google.mlkit:translate##17.0.0:2)
at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0$com-google-firebase-components-ComponentRuntime(ComponentRuntime.java:132)
at com.google.firebase.components.ComponentRuntime$$ExternalSyntheticLambda1.get(Unknown Source:4)
at com.google.firebase.components.Lazy.get(Lazy.java:53)
at com.google.firebase.components.AbstractComponentContainer.get(AbstractComponentContainer.java:27)
at com.google.firebase.components.ComponentRuntime.get(ComponentRuntime.java:45)
at com.google.firebase.components.RestrictedComponentContainer.get(RestrictedComponentContainer.java:89)
at com.google.mlkit.nl.translate.zzd.create(com.google.mlkit:translate##17.0.0:2)
at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0$com-google-firebase-components-ComponentRuntime(ComponentRuntime.java:132)
at com.google.firebase.components.ComponentRuntime$$ExternalSyntheticLambda1.get(Unknown Source:4)
at com.google.firebase.components.Lazy.get(Lazy.java:53)
at com.google.firebase.components.AbstractComponentContainer.get(AbstractComponentContainer.java:27)
at com.google.firebase.components.ComponentRuntime.get(ComponentRuntime.java:45)
at com.google.firebase.components.RestrictedComponentContainer.get(RestrictedComponentContainer.java:89)
at com.google.mlkit.nl.translate.zze.create(com.google.mlkit:translate##17.0.0:2)
at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0$com-google-firebase-components-ComponentRuntime(ComponentRuntime.java:132)
at com.google.firebase.components.ComponentRuntime$$ExternalSyntheticLambda1.get(Unknown Source:4)
at com.google.firebase.components.Lazy.get(Lazy.java:53)
at com.google.firebase.components.AbstractComponentContainer.get(AbstractComponentContainer.java:27)
at com.google.firebase.components.ComponentRuntime.get(ComponentRuntime.java:45)
at com.google.mlkit.common.sdkinternal.MlKitContext.get(com.google.mlkit:common##18.0.0:3)
at com.google.mlkit.nl.translate.Translation.getClient(com.google.mlkit:translate##17.0.0:1)
It will again work when I update another version from the play store.
Anyone can help, It will be appreciated.
I developed applications which use native code. All of a sudden those are not working, giving error "Unsatisfied link error: Couldn't load native library from loader dalvik.System.pathClassLoader, findLibrary returned null. I restarted adt twice. Still getting the same error. Applications which are not using native code, are working fine.
The error implies that the program is not able to find the shared libraries that you would have created.
Which devices did you try it on ?
You can check once if they are available in libs directory of your app . [/data/data/app_id/lib ]. Also check if armv7 support is required and if the directory is there in the libs , is .so present there.
Now it's working. I deleted all my virtual devices and then created a new one. However it's showing "skipped 264 frames. application may be doing too much work on main thread" many times and whenever we press a button, displaying this message in log "error loading /system/media/audio/ui/Effect_Tick.ogg"
thanks.
I'm having an issue with IntelliJ's dependency handling in regards to external modules. Here's some context:
I'm writing an Android app which implements Google Maps. For my current feature set, I require two external libraries-- Google's Play Services Library and mapex (A third party google map extension library located here https://code.google.com/p/mapex/). I actually built most of this project in Android Studio before I was recommended to move to IntelliJ due to the easier dependency handling. But now I'm here and still having problems.
My Error
When trying to build an object from a class located in the mapex package (com.androidnatic.maps), I get this error when starting the activity the view is contained in (object has not been created yet):
07-03 11:40:35.837: ERROR/dalvikvm(3585): Could not find class 'com.androidnatic.maps.SimpleMapView', referenced from method com.example.myproject.MapActivity.showHeatMap
And then, upon creation, my app force closes and leaves this behind in logcat:
7-03 11:40:45.467: ERROR/AndroidRuntime(3585): FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.androidnatic.maps.SimpleMapView
at com.example.myproject.MapActivity.showHeatMap(MapActivity.java:492)
Yet I'm completely stumped because my IDE gives me no sign that anything is wrong! Classes are auto-filled in when trying to access them from MyProject.
ide-fill-in http://www.tonyandrys.com/img/fillin.jpg
No build errors about missing classes, missing modules, class definitions, or anything related.
I get the same results if I try to access the class via its full package name as well.
// No dice.
final SimpleMapView mapView = new SimpleMapView(this, "apikey");
final com.androidnatic.maps.SimpleMapView mapView = new com.androidnatic.maps.SimpleMapView(this, "apikey");
It seems that there's only an issue when the application is running on my phone, as far as my IDE is concerned.
Here's the structure of MyProject:
main-project-structure http://www.tonyandrys.com/img/mainstructure.jpg
Here's my main project's dependency settings (where I assume I screwed up somewhere):
project-structure http://www.tonyandrys.com/img/projectstructure.jpg
And here is the structure of the mapex library module:
mapex-lib http://www.tonyandrys.com/img/mapexstructure.jpg
The class files that I'm trying to access live in MapExLib/gen and MapExLib/src, which are currently marked as source directories (blue).
Does anyone have any ideas on how to proceed from here?
Try to do this :
Android, IntelliJ Idea, changing module type
I had the same error "Could not find class XXX from referenced method XXX" with Intellij, involving an Android Test Module and a test which could not find the Activity class anywhere.
I set inside the Project Structure the main Module's Facet Android to Library Module (checkbox) and it worked...
Let us know
I want to extract Text from image simply implement OCR(Optical Character Recognition) in Android using Library LEPTONICA and TESSERACT.I have succesfully added the open source library to my sample project But when i am running my application but on run time app force closes and error was .... ExceptioninInitialization UnspecifiedLink Error...Library Not found
Any suggetion how to resolve this error...I am stuck on this