Giter Club home page Giter Club logo

Comments (5)

sdeleon28 avatar sdeleon28 commented on July 21, 2024

I think where it says android/app/src/main/java/.../MainActivity.java, you're actually supposed to edit android/app/src/main/java/.../MainApplication.java which extends ReactApplication instead. I'm creating a PR to fix that in the docs.

from react-native-sound.

sdeleon28 avatar sdeleon28 commented on July 21, 2024

Or maybe that's just in my particular config? I'm on RN 0.31.0

from react-native-sound.

caioaao avatar caioaao commented on July 21, 2024

Hm, idk. I got this code from react-native-sound-demo and it worked (with RN 0.31.0 as well)

from react-native-sound.

sdeleon28 avatar sdeleon28 commented on July 21, 2024

Not a clue. I'm pretty ignorant about native Android development. I follow instructions on the README like a monkey for the java part when I have to install a library like this :-)

In this case, getPackages wasn't in MainActivity.java for my project but was in MainApplication.java so I just edited it there. It seems to work OK although I'm unaware of the implications. Why do you think it's not a good idea? BTW, I created my project with react-native init.

If someone with a little more authority than me confirms editing MainApplication.java is actually the way to go, then I'll submit a PR for the README.

from react-native-sound.

benvium avatar benvium commented on July 21, 2024

This has been fixed via PR #85

from react-native-sound.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.