-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
native-activity crashes on startup #929
Comments
This fixes the issue, but I don't understand why configuring the InitializationProvider to remove all Initializers works, or is necessary. It seems like something is broken in the NativeActivity startup mechanism. |
the same problem, the same solution, and the samely confused. |
@hybcloud I try to remove |
sorry, i don't know.
…---Original---
From: ***@***.***>
Date: Wed, Sep 27, 2023 18:42 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [android/ndk-samples] native-activity crashes on startup (Issue#929)
according to the source code's comment, the Android tends to find the initializer in the application before it starts the first activity. I guess since it is a purely native application, there is no implementation of the initializer in the application, which leads to the failure.
@hybcloud I try to remove android:hasCode="false" in AndroidManifest.xml and it works. Does it mean this android:hasCode="false" config removes the initializer?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I think you're right in that FTR I think the proper fix here is to just use But there's still something odd here that I want to see fixed (or, if it's expected that |
These dependencies were not actually used but were in contradiction with the `android:hasCode=false` in the manifest. Remove the pointless dependencies, but leave some comments explaining to anyone that copies from here that they need to update `app:hasCode` if they add any DEX to their app. Fixes android#929.
These dependencies were not actually used but were in contradiction with the `android:hasCode=false` in the manifest. Remove the pointless dependencies, but leave some comments explaining to anyone that copies from here that they need to update `app:hasCode` if they add any DEX to their app. Fixes android#929.
With a bit more digging, I think we've managed to settle on the #1000 is the likely fix here (it's similar to the PR uploaded earlier today, but with comments for anyone that inevitably copy pastes from here). |
These dependencies were not actually used but were in contradiction with the `android:hasCode=false` in the manifest. Remove the pointless dependencies, but leave some comments explaining to anyone that copies from here that they need to update `app:hasCode` if they add any DEX to their app. Fixes #929.
Signed-off-by: Xiao Cheng <[email protected]>
The native-activity sample crashes on startup for me:
After some googling i managed to work around it by editing AndroidManifest.xml.
I changed the
manifest
element to be:Then i inserted the following under the
application
element:The text was updated successfully, but these errors were encountered: