Created
July 19, 2019 17:52
-
-
Save burhanyilmaz/b32d6c59954196013c9939eb82ecbc1a to your computer and use it in GitHub Desktop.
React Native 0.60.+ Unable to resolve module `react-native-gesture-handler` Hatasının Çözümü
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//dosya yolu: android/app/build.gradle | |
...... | |
dependencies { | |
// Bu kısma eklenecek | |
+ implementation project(':react-native-gesture-handler') | |
implementation fileTree(dir: "libs", include: ["*.jar"]) | |
implementation "com.facebook.react:react-native:+" // From node_modules | |
if (enableHermes) { | |
def hermesPath = "../../node_modules/hermesvm/android/"; | |
debugImplementation files(hermesPath + "hermes-debug.aar") | |
releaseImplementation files(hermesPath + "hermes-release.aar") | |
} else { | |
implementation jscFlavor | |
} | |
} | |
....... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dosya yolu: android/app/src/main/java/com/rnavigationerror/MainApplication.java | |
package com.rnavigationerror; | |
import android.app.Application; | |
import android.util.Log; | |
import com.facebook.react.PackageList; | |
import com.facebook.hermes.reactexecutor.HermesExecutorFactory; | |
import com.facebook.react.bridge.JavaScriptExecutorFactory; | |
import com.facebook.react.ReactApplication; | |
// bu kısma ekelencek. | |
+ import com.swmansion.gesturehandler.react.RNGestureHandlerPackage; | |
import com.facebook.react.ReactNativeHost; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.soloader.SoLoader; | |
import java.util.List; | |
public class MainApplication extends Application implements ReactApplication { | |
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { | |
@Override | |
public boolean getUseDeveloperSupport() { | |
return BuildConfig.DEBUG; | |
} | |
@Override | |
protected List<ReactPackage> getPackages() { | |
@SuppressWarnings("UnnecessaryLocalVariable") | |
List<ReactPackage> packages = new PackageList(this).getPackages(); | |
// Bu kısma eklenecek. | |
+ packages.add(new RNGestureHandlerPackage()); | |
// Packages that cannot be autolinked yet can be added manually here, for example: | |
// packages.add(new MyReactNativePackage()); | |
return packages; | |
} | |
@Override | |
protected String getJSMainModuleName() { | |
return "index"; | |
} | |
}; | |
@Override | |
public ReactNativeHost getReactNativeHost() { | |
return mReactNativeHost; | |
} | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
SoLoader.init(this, /* native exopackage */ false); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dosya yolu: android/settings.gradle | |
rootProject.name = 'rnavigationerror' | |
+ include ':react-native-gesture-handler' | |
+ project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android') | |
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) | |
include ':app' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment