Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

szq4119/react-native-async-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

###Asynchronous Http Client for Android
https://github.com/loopj/android-async-http

Installation

npm install react-native-async-http@latest --save

Getting started - Android

  • Inandroid/setting.gradle
...include':react-native-async-http'project(':react-native-async-http').projectDir=newFile(rootProject.projectDir,'../node_modules/react-native-async-http/android')
  • Inandroid/app/build.gradle
...dependencies {...    compile project(':react-native-async-http')}
  • register module (in MainActivity.java)
importcom.smccz.asynchttp.AsyncHttpAndroidPackage;// <--- importpublicclassMainActivityextendsActivityimplementsDefaultHardwareBackBtnHandler {  ......@OverrideprotectedvoidonCreate(BundlesavedInstanceState) {super.onCreate(savedInstanceState);mReactRootView =newReactRootView(this);mReactInstanceManager =ReactInstanceManager.builder()      .setApplication(getApplication())      .setBundleAssetName("index.android.bundle")      .setJSMainModuleName("index.android")      .addPackage(newMainReactPackage())      .addPackage(newAsyncHttpAndroidPackage())// <------ add here      .setUseDeveloperSupport(BuildConfig.DEBUG)      .setInitialLifecycleState(LifecycleState.RESUMED)      .build();mReactRootView.startReactApplication(mReactInstanceManager,"example",null);setContentView(mReactRootView);  }  ......}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp