hypery2k / nativescript-fabric

Handling App URLs in nativescript apps
MIT License
30 stars 14 forks source link

Fabric could not be initialized, API key missing from AndroidManifest.xml #129

Closed priyangamani closed 6 years ago

priyangamani commented 6 years ago

@hypery2k

It gives me error that Fabric could not be initialized, API key missing from AndroidManifest.xml. when the entry is already there in manifest file.Following is the error log.

"nativescript-fabric": "^1.0.6-develop-133",

ERROR LOG.

05-10 11:30:35.766 6769-6769/org.nativescript.flash I/JS: Fabric: Activating Fabric kits
05-10 11:30:35.800 6769-6840/org.nativescript.flash E/Fabric: Error dealing with settings
    java.lang.IllegalArgumentException: Fabric could not be initialized, API key missing from AndroidManifest.xml. Add the following tag to your Application element 
        <meta-data android:name="io.fabric.ApiKey" android:value="YOUR_API_KEY"/>
        at io.fabric.sdk.android.services.common.ApiKey.logErrorOrThrowException(ApiKey.java:130)
        at io.fabric.sdk.android.services.common.ApiKey.getValue(ApiKey.java:67)
        at io.fabric.sdk.android.services.settings.Settings.initialize(Settings.java:78)
        at io.fabric.sdk.android.Onboarding.retrieveSettingsData(Onboarding.java:124)
        at io.fabric.sdk.android.Onboarding.doInBackground(Onboarding.java:99)
        at io.fabric.sdk.android.Onboarding.doInBackground(Onboarding.java:45)
        at io.fabric.sdk.android.InitializationTask.doInBackground(InitializationTask.java:63)
        at io.fabric.sdk.android.InitializationTask.doInBackground(InitializationTask.java:28)
        at io.fabric.sdk.android.services.concurrency.AsyncTask$2.call(AsyncTask.java:311)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
        at java.lang.Thread.run(Thread.java:818)
05-10 11:30:35.809 6769-6769/org.nativescript.flash E/Fabric: Failure onPreExecute()
    java.lang.IllegalArgumentException: Fabric could not be initialized, API key missing from AndroidManifest.xml. Add the following tag to your Application element 
        <meta-data android:name="io.fabric.ApiKey" android:value="YOUR_API_KEY"/>
        at io.fabric.sdk.android.services.common.ApiKey.logErrorOrThrowException(ApiKey.java:130)
        at io.fabric.sdk.android.services.common.ApiKey.getValue(ApiKey.java:67)
        at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:218)
        at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:207)
        at io.fabric.sdk.android.InitializationTask.onPreExecute(InitializationTask.java:44)
        at io.fabric.sdk.android.services.concurrency.AsyncTask.executeOnExecutor(AsyncTask.java:611)
        at io.fabric.sdk.android.services.concurrency.PriorityAsyncTask.executeOnExecutor(PriorityAsyncTask.java:43)
        at io.fabric.sdk.android.Kit.initialize(Kit.java:69)
        at io.fabric.sdk.android.Fabric.initializeKits(Fabric.java:440)
        at io.fabric.sdk.android.Fabric.init(Fabric.java:384)
        at io.fabric.sdk.android.Fabric.setFabric(Fabric.java:342)
        at io.fabric.sdk.android.Fabric.with(Fabric.java:333)
        at com.tns.Runtime.callJSMethodNative(Native Method)
        at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1088)
        at com.tns.Runtime.callJSMethodImpl(Runtime.java:970)
        at com.tns.Runtime.callJSMethod(Runtime.java:957)
        at com.tns.Runtime.callJSMethod(Runtime.java:941)
        at com.tns.Runtime.callJSMethod(Runtime.java:933)
        at com.tns.gen.android.app.Application_ActivityLifecycleCallbacks.onActivityStarted(Application_ActivityLifecycleCallbacks.java:18)
        at android.app.Application.dispatchActivityStarted(Application.java:205)
        at android.app.Activity.onStart(Activity.java:1146)
        at com.tns.Runtime.callJSMethodNative(Native Method)
        at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1088)
        at com.tns.Runtime.callJSMethodImpl(Runtime.java:970)
        at com.tns.Runtime.callJSMethod(Runtime.java:957)
        at com.tns.Runtime.callJSMethod(Runtime.java:941)
        at com.tns.Runtime.callJSMethod(Runtime.java:933)
        at com.tns.NativeScriptActivity.onStart(NativeScriptActivity.java:44)
        at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
        at android.app.Activity.performStart(Activity.java:6253)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
        at android.app.ActivityThread.-wrap11(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5417)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-10 11:30:35.810 6769-6769/org.nativescript.flashcash I/JS: Fabric: Init done
hypery2k commented 6 years ago

did you created a fabric.json?

priyangamani commented 6 years ago

yes having.. image

hypery2k commented 6 years ago

and the values are not empty?

{
    "using_ios": "y",
    "using_android": "y",
    "api_key": "<not_empt>",
    "api_secret": "<not_empt>"
}
priyangamani commented 6 years ago

yes having... image

priyangamani commented 6 years ago

My app.js File.. var nativescript_fabric = require("nativescript-fabric"); app.start({ moduleName: "pages/splashScreen" }); nativescript_fabric.Fabric.init(); Anything else i need to do?

app/Android_Resources/android/Android_Manifest.xml image

hypery2k commented 6 years ago

did you tried version 2.0.2?

priyangamani commented 6 years ago

yeah,i tried it's working fine in android 👍 .