AgoraIO-Extensions / react-native-agora

React Native around the Agora RTC SDKs for Android and iOS agora
https://www.agora.io
MIT License
625 stars 227 forks source link

Task :react-native-agora:compileReleaseJavaWithJavac FAILED #214

Closed MariaNabil closed 4 years ago

MariaNabil commented 4 years ago

It is working good in debug mode but in release I got this error : Task :react-native-agora:compileReleaseJavaWithJavac FAILED

Here is my package.json file :

"dependencies": { "@babel/runtime": "^7.4.5", "@eva-design/eva": "^1.0.1", "@valdio/react-native-scrollable-tabview": "^0.8.12", "accordion-collapse-react-native": "^0.1.11", "axios": "^0.19.0", "html-entities": "^1.2.1", "moment": "^2.24.0", "native-base": "^2.8.2", "react": "^16.13.1", "react-native": "^0.62.2", "react-native-agora": "2.9.1-alpha.3", "react-native-awesome-alerts": "^1.2.0", "react-native-bouncing-preloader": "^1.0.1", "react-native-btr": "^1.1.4", "react-native-dash": "0.0.9", "react-native-date-picker": "^2.7.3", "react-native-datepicker": "^1.7.2", "react-native-dates": "^2.0.4", "react-native-document-picker": "^3.2.4", "react-native-easy-grid": "^0.2.2", "react-native-floating-action": "^1.18.0", "react-native-gesture-handler": "^1.6.1", "react-native-image-crop-picker": "^0.25.3", "react-native-keyboard-aware-scroll-view": "^0.9.1", "react-native-linear-gradient": "^2.5.6", "react-native-maps": "^0.26.1", "react-native-modal-datetime-picker": "^7.6.0", "react-native-multiple-select": "^0.5.3", "react-native-ratings": "^6.5.0", "react-native-raw-bottom-sheet": "^2.0.5", "react-native-reanimated": "^1.9.0", "react-native-render-html": "^4.1.2", "react-native-restart": "0.0.13", "react-native-screens": "^2.8.0", "react-native-simple-time-picker": "^0.2.0", "react-native-snap-carousel": "^3.8.4", "react-native-star-rating": "^1.1.0", "react-native-svg": "^12.1.0", "react-native-swipeable-cards": "^1.1.23", "react-native-swipeable-flat-list": "^0.1.1", "react-native-ui-kitten": "^4.1.0", "react-native-vector-icons": "^6.6.0", "react-native-webview": "^8.0.2", "react-navigation": "^3.11.1", "react-redux": "^7.1.1", "redux": "^4.0.4", "redux-thunk": "^2.3.0" },

How can I solve this please ? Thanks in advance .

LichKing-2234 commented 4 years ago

any more build log?

ank26oct commented 4 years ago

Facing same issue on release build. Working fine in debug release but crashes on release build. Getting this errror: Didn't find class "io.agora.rtc.mediaio.VideoFrameConsumerImpl" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar"

com.google.android.apps.gsa.shared.speech.b.g: Error reading from input stream at com.google.android.apps.gsa.staticplugins.microdetection.d.k.a(SourceFile:91) at com.google.android.apps.gsa.staticplugins.microdetection.d.l.run(Unknown Source:14) at com.google.android.libraries.gsa.runner.a.a.b(SourceFile:32) at com.google.android.libraries.gsa.runner.a.c.call(Unknown Source:4) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.google.android.apps.gsa.shared.util.concurrent.b.g.run(Unknown Source:4) at com.google.android.apps.gsa.shared.util.concurrent.b.aw.run(SourceFile:4)

rebirthtobi commented 4 years ago

I am also facing this same issue as @ank26oct after bundleRelease but works with metro server

Screenshot_2020-06-16-11-10-09-203_com miui bugreport (1)

ank26oct commented 4 years ago

I have resolved it by adding following:

  1. Add these permissions in AndroidManifest.xml
  1. Edit android/proguard-rules.pro add following : -keep class io.agora.*{;}

  2. mkdir -p android/app/src/main/assets curl "localhost:8081/index.bundle?platform=android&dev=false&minify=true" -o "android/app/src/main/assets/index.android.bundle" cd android ./gradlew assembleRelease

MariaNabil commented 4 years ago

error

rebirthtobi commented 4 years ago

Thanks @ank26oct -keep class io.agora.**{*;} fix the issue for me, I am left with remote video not showing now

LichKing-2234 commented 4 years ago

@MariaNabil have you migrate to AndroidX? maybe you should add android.enableJetifier=true to your gradle.properties