How to include AAR in React Native Android build?

前端 未结 3 684
南方客
南方客 2020-12-19 06:27

I\'m trying to include an AAR file with my React Native Android app so that I can access its features using native code. How can I bundle an AAR so that native code can impo

3条回答
  •  北海茫月
    2020-12-19 07:06

    I tried many ways,

    OPEN FOLDER WITH ANDROID STUDIO AND JUST ADD THE AAR OR JAR

    The easiest way was to open the generated folder inside de react native project with android studio. Them add the aar as adding the aar to a regular project.

    In android Studio add as always (Friendly Remainder):

    1. Open Module Settings (Right click on top of the project)
    2. Import aar/jar
    3. Add to Dependencies

提交回复
热议问题