Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassNotFoundException com.evollu.react.fcm.InstanceIdService #3

Closed
arpu opened this issue Jun 2, 2016 · 6 comments
Closed

ClassNotFoundException com.evollu.react.fcm.InstanceIdService #3

arpu opened this issue Jun 2, 2016 · 6 comments

Comments

@arpu
Copy link

arpu commented Jun 2, 2016

any idea what is missing?

E/AndroidRuntime(19958): java.lang.RuntimeException: Unable to instantiate service com.evollu.react.fcm.InstanceIdService: java.lang.ClassNotFoundException: Didn't find class "com.evollu.react.fcm.InstanceIdService" on path: DexPathList[[zip file "/data/app/com.zib100-1/base.apk"],nativeLibraryDirectories=[/data/app/com.zib100-1/lib/arm, /vendor/lib, /system/lib]]
E/AndroidRuntime(19958): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2776)
E/AndroidRuntime(19958): at android.app.ActivityThread.access$1800(ActivityThread.java:155)
E/AndroidRuntime(19958): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1400)
E/AndroidRuntime(19958): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(19958): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(19958): at android.app.ActivityThread.main(ActivityThread.java:5343)
E/AndroidRuntime(19958): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(19958): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(19958): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
E/AndroidRuntime(19958): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
E/AndroidRuntime(19958): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.evollu.react.fcm.InstanceIdService" on path: DexPathList[[zip file "/data/app/com.zib100-1/base.apk"],nativeLibraryDirectories=[/data/app/com.zib100-1/lib/arm, /vendor/lib, /system/lib]]
E/AndroidRuntime(19958): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
E/AndroidRuntime(19958): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
E/AndroidRuntime(19958): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
E/AndroidRuntime(19958): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2773)
E/AndroidRuntime(19958): ... 9 more
E/AndroidRuntime(19958): Suppressed: java.lang.ClassNotFoundException: com.evollu.react.fcm.InstanceIdService
E/AndroidRuntime(19958): at java.lang.Class.classForName(Native Method)
E/AndroidRuntime(19958): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
E/AndroidRuntime(19958): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
E/AndroidRuntime(19958): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
E/AndroidRuntime(19958): ... 11 more
E/AndroidRuntime(19958): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
W/ActivityManager( 838): Force finishing activity 1 com.zib100/.MainActivity

@arpu
Copy link
Author

arpu commented Jun 2, 2016

hm changed the Androidmanifest
but now i get this
undefined is not an object (evaluating 'FIRMessaging.requestPermissions')

@arpu arpu closed this as completed Jun 2, 2016
@LucasBassetti
Copy link

Same problem. Anybody knows how to solve that?

@ssmlee04
Copy link

ssmlee04 commented Sep 4, 2016

Same problem..

@edy
Copy link

edy commented Sep 5, 2016

same here.

@arpu what did you change in your manifest?

@edy
Copy link

edy commented Sep 5, 2016

solved!

android/app/build.gradle: add compile project(':react-native-fcm')
android/settings.gradle: add

include ':react-native-fcm'
project(':react-native-fcm').projectDir = new File(rootProject.projectDir, '../node_modules/react-ative-fcm/android')`

Also add following to MainApplication.java:

...
import android.app.Application;
...
import com.evollu.react.fcm.FIRMessagingPackage; // <------
...
public class MainApplication extends Application implements ReactApplication {
...
    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new FIRMessagingPackage() // <------
      );
    }
  };
}

see #19

evollu pushed a commit that referenced this issue Dec 1, 2016
* feature(android): add support for badge count (#1)

Using Leolin's ShortcutBadger we are able to support any badge counts that are sent as part of the notifications data-payload.

* refactor(android): expand badge support (#3)
@narychen
Copy link

narychen commented Apr 29, 2017

@edy Your '../node_modules/react-ative-fcm/android' is missing 'n' in react-native.
And it takes me an hour to find out what's wrong with gradle build error
'Error:Configuration with name 'default' not found.'

stefen pushed a commit to PandaRose/react-native-fcm that referenced this issue May 10, 2021
Update FIRLocalMessagingHelper.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants