Comments (20)
No offence taken. I closed the issue as it was not directly related to the sample at hand. Can I ask you to add links to the issue you created? We don't generally offer 1:1 support for development outside of office hours at some conferences.
When you're using a module without code, make sure to set hasCode
to false
as described here and demonstrated here.
from app-bundle-samples.
I fully understand that this is not some kind of a service desk :) - Link to the issue filled to the bug tracker. And also yes, we are having hasCode
set to false
.
There are probably a lot of different ways how to implement desired functionality (provide image resources as an add-on). Just wanted to understand whether there is a bug in Play Core Library, or whether we did something wrong during implementation after I have spent a couple of days with it, I am just curious. It could even be that I did not get the whole concept right and we are misusing the dynamic delivery modules for something they were not intended for. Honestly, I have not found many other apps using Dynamic Delivery Module to provide the same functionality, so might be that we are getting this completely wrong.
from app-bundle-samples.
What you're describing is news to me. Does this occur on the assets
module in the sample app as well?
from app-bundle-samples.
Sorry for the delay, our app uses this and it is Java one, so I am currently kind of struggling with build Kotlin based code app bundle..
from app-bundle-samples.
In the sample app, it does not happen, so I see I am barking up the wrong tree here. But I see this relies on the different feature (dynamic asset delivery), probably we are going to try to implement this and store our images in assets instead of drawable. Thanks for your support and time, I guess we can close this one.
from app-bundle-samples.
It's even harder to found reason for such error because there is missing source code. It's open just stubs method during debugging and documentation is quite brief :-(
from app-bundle-samples.
Yes, but I think Ben's point is that this is not an issue of this app bundle sample, but more probably a general bug in dynamic feature modules itself.
from app-bundle-samples.
Yes. It will be. Actually, the sample works even with bad SplitCompat.install()
used in activity. I originally started here because of this problem.
from app-bundle-samples.
I eventually ended up getting the same error as you @tprochazka, just not for the string resource, but for the image. My use case:
In my main app module, I load a list of resources coming from the dynamic delivery module (com.xxxzzz.fg) like this:
int drawableResId = this.getResources().getIdentifier(String.format("%s_%s", basePictureName, i),"drawable","com.xxxzzz.fg");
Then, still in the main app module, I pass this drawableResId to popular 3rd party gallery (StfalconImageViewer). More precisely, I set it as imageView.setImageResource(drawableRes)
. This works perfectly, when install Bundle using ADB, however once trying this from Internal sharing/alfa build, I can get drawableResId, but I cannot load the image itself. However, I can load any resource located in the main app module this way with no problem. Strangely enough, if I do not use direct setImageResource
and load image into ImageView using Picasso library, it works for the first time (until application gets killed at least once after installation of feature module) and then stops. Still, I can get drawableResId, but cannot access resource with the error shown in my first post. This gets only resolved by the manual calling of SplitInstallManager.deferredUninstall
and later SplitInstallManager.startInstall
again.
Seems like there is some difference between resources located in main app module and feature module, but I cannot find any mention of this in the documentation. Note that using Dynamic Assets is not a good option for us, as we need to work with image resources for various reasons...
from app-bundle-samples.
Just after a module is installed I can access any resource which is directly in my module. But it always fails for a resource inside of any 3rd party library (which should be part of module too).
And yes after I kill the app and run it again it crashing also on my own resources ad you mentioned. I did not try this before. It looks that nobody from google test in on some more complex app that this sample app :-(
from app-bundle-samples.
Thanks for the continued discussion on the topic.
If you believe this is an issue with PlayCore, you could help me to try and reproduce it within the sample in a PR. This way we can make sure we're all talking about the same thing and find a way to fix it faster.
from app-bundle-samples.
Also, could you confirm that you're either extending from SplitCompatApplication
or invoking SplitCompat.install
in your base module's activities.
from app-bundle-samples.
Thanks for being patient with us. Honestly, now I think that there might be some kind of issue in PlayCore. I have tried both SplitCompat.install
and SplitCompat.installActivity
in attachBaseContext
of base module's activity that should use resources from the dynamic feature module. What does PR stand for? I can either give you access to our bitbucket repository to see the actual implementation, or I can try to extract related logic to some standalone project.
from app-bundle-samples.
Thank you for confirming. Apologies, PR is short for Pull Request.
If you're able to reproduce the issue in this codebase we can take a closer look into how that happened.
from app-bundle-samples.
Ok, as I work with GitLab normally, where there are MRs, PR did not rung the bell :). I will try to provide PR.
from app-bundle-samples.
It works completely random. My app started working somehow. I just moved several 3rd party libraries to the main module instead of the feature module. But now I added some new dimension to my feature module and accessing it by getResources().getDimensionPixelSize(R.dimen.innert_touch_area);
and it again crash all the time on it.
It is very sad, that the whole SplitCompat is the close source and even obfuscated. Is almost impossible to found why this happens. I would like at least to understand what SplitCompat.installActivity(this)
does. I thought that it somehow injects resource management and when I call getResources() it will return some custom implementation instead of default one. But when it crashes, the stack trace looks completely normal:
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7e040028
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:228)
at android.content.res.Resources.getDimensionPixelSize(Resources.java:742)
at cz.tvprogram.lepsitv.PlayerActivity.onCreate(PlayerActivity.java:200)
at android.app.Activity.performCreate(Activity.java:7327)
at android.app.Activity.performCreate(Activity.java:7318)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3094)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3257)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7050)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
from app-bundle-samples.
@bazinac Do you have WebView in your app? I just found that my problem is caused by WebView.
from app-bundle-samples.
I created bug report for it here
https://issuetracker.google.com/issues/162779750
from app-bundle-samples.
Thanks for reporting this issue. It sounds like you have a sample to reproduce this ready. Can you either attach it to the issue you created or open a PR on this repository? This way we can make sure that reproduction is possible.
from app-bundle-samples.
Sample code is very easy, but I created it here:
https://github.com/tprochazka/app-bundle-samples/tree/bug-162779750
from app-bundle-samples.
Related Issues (20)
- Task :Teapot:externalNativeBuildRelease FAILED HOT 1
- Resource Not Found error after close and relaunch the app HOT 1
- Duplicate class in play.core On Build Unity 2020 LTS
- AAssetManager cannot handle a pack nearly 2GB on 32 bit device
- Resource Not Found Exception
- Q: Instant Apps
- dynamic-feature mlkit translate
- Resource Not Found Relaunch Application on-Demand Dynamic Feature Module HOT 4
- Resources$NotFoundException HOT 4
- Sample code at app-bundle-samples/PlayAssetDelivery/NativeSample/ not generating all standalone apks HOT 1
- Play Asset Delivery Error Code does not match HOT 1
- Can PAD deliver SO?
- Security Policy violation Binary Artifacts HOT 28
- I want put all arr files to dynamic feature module, but have question
- Question: Would the install-time delivery still violate the maximum size limitation?
- GoogleAnalytics sample app build fails with "Unable to make protected void java.net.URLClassLoader.addURL(java.net.URL) accessible"
- ContentProvider in dynamic module HOT 1
- What about the assets file in the aar package?
- Dynamic feature UnsatisfiedLinkError
- Error receiving broadcast Intent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app-bundle-samples.