Comments (10)
This should now be fixed. I also changed the example folder to use release version of RN instead of compiling from master branch. It should make it a lot easier to experiment without having ndk or needing to compile source
from react-native-cronet.
Thanks for letting me know, I will add it into the README
from react-native-cronet.
Yeah, 0.61 had a few issue that had commit/PR created in RN master, unfortunately 0.62 took a while to release. Now that its out I will work on an updated version of this library to simplify integration and better cross platform support
from react-native-cronet.
Looks like react native added changes to master that prevents the example from building, should have a fix soon.
from react-native-cronet.
Hi @clytras , I noticed that after I installed NDK:
https://developer.android.com/studio/projects/install-ndk
and set the env variable ANDROID_NDK in my .bash_profile:
bilibili/ijkplayer#1011
'yarn android' compiles okay, and the example app is now running on my Android phone.
from react-native-cronet.
Maybe this is a Windows issue only. After I added ANDROID_NDK
env to my path of local Android NDK R21, I got the following error:
> Task :ReactAndroid:buildReactNdkLib FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
20 actionable tasks: 20 executed
D:/Dev/Android/NDK/android-ndk-r21/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld: error: cannot open C:\Users\zkr32\Sandbox\react-native-cronet\example\node_modules\react-native\ReactAndroid\build\tmp\buildReactNdkLib/local/armeabi-v7a/objs/jsinspector/C_/Users/zkr32/Sandbox/react-native-cronet/example/node_modules/react-native/ReactAndroid/__/ReactCommon/jsinspector/InspectorInterfaces.o: No such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [D:/Dev/Android/NDK/android-ndk-r21/build//../build/core/build-binary.mk:725: C:\Users\zkr32\Sandbox\react-native-cronet\example\node_modules\react-native\ReactAndroid\build\tmp\buildReactNdkLib/local/armeabi-v7a/libjsinspector.so] Error 1
make: *** Waiting for unfinished jobs....
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ReactAndroid:buildReactNdkLib'.
> Process 'command 'D:\Dev\Android\NDK\android-ndk-r21\ndk-build.cmd'' finished with non-zero exit value 2
I have now both ANDROID_NDK
and ANDROID_SDK
setup to the correct paths.
Android SDK Build-Tools 30-rc2
Android SDK Platform-Tools: 29.0.6
Android SDK Tools: 26.1.1
Android NDK: R21 x86_64
PS: It's a new and clean git clone https://github.com/akshetpandey/react-native-cronet.git
of course.
EDIT
I have manually downloaded Android NDK R21 from Android NDK Downloads. Do I have to install NDK using Android Studio?
from react-native-cronet.
I am pretty sure the version of RN in the example folder won't build on windows. Let me update the example to 0.62. That should fix it.
from react-native-cronet.
I also suggest trying to build a clean version of react-native-cli init
app and see if that works.
from react-native-cronet.
It works with a new RN 0.62 project!
The example needs some refactoring. It has even a patch for @react-native-community/[email protected]
that is no needed any more.
Also the package lacks auto linking support. I followed the steps on the README, copied App.js
from the example app, and modified MainAppplication.java
with updated getPackages
and ImagePipelineConfig
config.
One thing that I did not try to do, is setting setCustomCronetBuilder
in MainActivity.java
.
Yet, I am not sure if this issue should be closed before example app is fixed to run on Windows out of the box without any issues.
from react-native-cronet.
I confirm that the example is now working on Windows using exactly the steps described in open post.
And it loads images super fast!
Thank you @akshetpandey ππΊπ»
from react-native-cronet.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-cronet.