Clip-sub / react-native-bottomsheet

True Cross-platform ActionSheet for Android and iOS
MIT License
92 stars 24 forks source link

fix: bottomsheet-1.3.1.aar incorrectly includes aapt/AndroidManifest.xml #23

Closed mikehardy closed 5 years ago

mikehardy commented 5 years ago

I removed it, re-packed it, put it in android/libs and referenced it from libs The dependency is effectively dead / unsupported anyway, so should not be a maintenance burden

Fixes #22

Demonstrated working at https://github.com/mikehardy/rn-androidx-demo / https://github.com/mikehardy/rn-androidx-demo/blob/master/make-demo.sh#L34

mikehardy commented 5 years ago

I should mention, if you don't trust me enough to take my binary aar file (and who am I anyway?? don't trust me!) the alteration to the aar was:

mkdir temp && cd temp
jar -xvf ../bottomsheet-1.3.1.aar && rm ../bottomsheet-1.3.1.aar
\rm -fr aapt # This is the fix, aapt/AndroidManifest.xml is the problem
jar -cvf ../bottomsheet-1.3.1.aar *

Then just throw that in android/libs and reference it like so in the gradle.

mikehardy commented 5 years ago

@Doko-Demo-Doa I think this will fix the dependency for your library so you're library users are ready for AndroidX if they want

Doko-Demo-Doa commented 5 years ago

Sure, let me check and do the merging.

Doko-Demo-Doa commented 5 years ago

Thank you. Your implementation works well. v2.0.1 pushed with crashing issue fixed too.

JerakRus commented 3 years ago

It seems in version 2.2.0 this error occurs again, or something very similar.

Снимок экрана 2020-12-02 в 10 42 35

react-native:0.63.4 react-native-bottomsheet: 2.2.0

I just ran ./gradlew assembleRelease in my project.

UPD: I downgraded back to 2.0.1 but the problem persists. It seems to be a matter of updating react-native. Then I decided to look into the library files, and find out what is outdated there. Here's what I saw: we use android.permission.SYSTEM_ALERT_WINDOW and here's some information on it. Complete obsolescence just happens on android api 29, which uses react-native 0.63. It is not entirely clear why the problem did not appear earlier, but it seems in any case the library has no future, because the alternative that Google offers us does not have the necessary functionality.

P.s. Perhaps someone who is better versed in native code than me will look at this and say that I'm wrong. I'll be glad if this is so, but so far I realized that things are bad here.

P.s.s. Apparently the problem is still different from the original one, and I should have opened new issues, but I beg your pardon, I don't have much time for this now.

Doko-Demo-Doa commented 3 years ago

I see. I think it's better to fork another lib instead of continuing to use current one. Any suggestions?

Doko-Demo-Doa commented 3 years ago

2.5.2 released and it should be what you are looking for.