Cannot find symbol new ReactNativePushNotificationPackage
See original GitHub issueSo I was just setting up the project but always have an error regarding the ReactNativePushNotificationPackage .
I am using:
“react-native-push-notification”: “^3.0.2”, “react”: “16.3.0-alpha.1”, “react-native”: “0.54.2”,
it says package com.dieam.reactnativepushnotification does not exist
thus resulting for : cannot find symbol new ReactNativePushNotificationPackage(),
Here is the code:
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.dieam.reactnativepushnotification.ReactNativePushNotificationPackage;
import com.reactnativedocumentpicker.ReactNativeDocumentPicker;
import org.wonday.pdf.RCTPdfView;
import com.arttitude360.reactnative.rngoogleplaces.RNGooglePlacesPackage;
import io.realm.react.RealmReactPackage;
import com.airbnb.android.react.maps.MapsPackage;
import com.BV.LinearGradient.LinearGradientPackage;
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import com.imagepicker.ImagePickerPackage; // <-- add this import
import com.RNFetchBlob.RNFetchBlobPackage;
import java.util.Arrays;
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() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new ReactNativePushNotificationPackage(),
new ReactNativeDocumentPicker(),
new RCTPdfView(),
new RNGooglePlacesPackage(),
new RNFetchBlobPackage() ,
new RealmReactPackage(),
new MapsPackage(),
new ImagePickerPackage(),
new LinearGradientPackage(),
new ReactNativeConfigPackage()
);
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:11
Top Results From Across the Web
I have a problem with installing react-native-push-notification
java:39: error : cannot find symbol new ReactNativePushNotificationPackage() ^ symbol: class ReactNativePushNotificationPackage 2 errors FAILURE: ...
Read more >Android – Trying to add MultiDex support – cannot find symbol ...
I am getting an error cannot find symbol class Context variable context and variable ... new ReactNativePushNotificationPackage(), new RNAdMobPackage(), new ...
Read more >react-native-push-notification - npm
Manually register module in MainApplication.java (if you did not use react-native link ):. import com.dieam.reactnativepushnotification.
Read more >In-app-payments-react-native-plugin android sqip ...
... does not exist /${PROJECT_DIR}/android/app/src/main/java/com/project/project_name/MainApplication.java:61: error: cannot find symbol new ...
Read more >[Solved]-React Native WebView error "_onLoadingStart"
React Native Webview Google Sign In(Android) error : Couldn't sign you in This ... "react-native-push-notification" package causing multiple dex debug error ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Update: I added: compile project(‘:react-native-push-notification’) on build.gradle , now the app is crashing … I tried almost everything. I followed the documentation carefully Still the same problem. Any Thoughts about this?
by adding “implementation project(‘:react-native-push-notification’)” build successful but app crashing react:16.2 react-native:0.52