tariq86 / rn-sip-app

React Native SIP App
66 stars 45 forks source link

Init apps and crash #17

Open hai-ru opened 3 years ago

hai-ru commented 3 years ago

I succed to install and npm run android, But after bundled and runing apps, its always force close and crash whitout message.

Steps to reproduce the behavior:

  1. clone project

  2. npm install & after that npm audit fix for fixing vulnarable package.

  3. add below code at the end line in gradle.properties for remove androidmanifest error

    android.useAndroidX=true
    android.enableJetifier=true
  4. change /android/app/build.gradle applicationId, its incorect. so MainActivity not runing correctly on Apps

    ....
    defaultConfig {
        applicationId "com.tariq86.rnsip"
    ......
  5. runing the apps with npm run android or npx react-native run-android

Expected behavior I hope the can runing properly like a normal apps, so I can test how is it sip working in react native.

Desktop :

Smartphone:

dinahapuque commented 3 years ago

There are other places where "com.tariq86.rnsip" is incorrect. You have to change these places below to make it work.

  1. android/app/build.gradle defaultConfig { applicationId "com.tariq86.rnsip" }

  2. _android/app/src/main/java/com/appname/MainActivity.java first line: package com.tariq86.rnsip;

  3. _android/app/src/main/java/com/appname/MainApplication.java first line: package com.tariq86.rnsip;

  4. android/app/src/main/AndroidManifest.xml package="com.tariq86.rnsip"

When I made these changes, I could compile on Android without crashing on init.