-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Cannot find symbol "LocalBroadcastManager" #71
Comments
Hi @MrWeezle I merged PR without any modification and the last PR commit is: - import androidx.LocalBroadcastManager;
+ import androidx.localbroadcastmanager.content.LocalBroadcastManager; This is mostly a capacitor issue and you need further investigations on it. When I'll have a time-slot give I try to figure out the problem |
Thanks for the reply. I looked at the commits in the wrong order, my bad. But the solution is changing the implementation lines in the gradle file. add
and remove
At least that's what solved the issue for me for building with Android Studio but not with Jenkins because even though I added the gradle to git the change is overridden to the default when using npx cap sync |
I found a solution that works for me: In the plugin.xml file in the section for android I changed
The Build process updates the gradle file correctly and no errors are shown. I cannot confirm that changing the used library in the framework part works for every use case, but it works for our app. |
HI @MrWeezle I think that your update to I'll arrange a new release with your fix |
hi @bsorrentino Thank you very much for the fast response. |
replace com.android.support:support-v4:26+ with androidx.localbroadcastmanager:localbroadcastmanager:1.1.0 issue #71
fixed in release |
I upgraded my Ionic App to Capacitor 5 and also updated all plugins to the newest compatible version.
I also updated this plugin (cordova-broadcaster) to version 5.0.0 where I saw that a fix for androidx was implemented.
Sadly, the build still fails with the following error message:
Manually editing the gradle file to add
implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0"
and removing
implementation "com.android.support:support-v4:26+"
because it is not compatible, results in a working Build in Android Studio and a functioning broadcaster. Leaving the support-library in results in following error messages, thus i removed it:
But building it with Jenkins always fails, because the gradle file is overridden with capacitor sync.
The import in CSVBroadcaster.java is
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
which is different from the value I saw in the PR a few days ago.
Is there any solution to get a working build with Jenkins?
The text was updated successfully, but these errors were encountered: