简体   繁体   中英

Failed to find provider info for urbanairship.provider

I'm not sure this question is answerable, but I'm getting desperate so hopefully there is someone with more experience who may know what's going on. I've not used urbanairship before.

I've inherited a project and migrated it from eclipse to android studio. I could not get it to run in eclipse, but have managed to get it to run in android studio as much as it does when I download the app from the store (it's a very buggy app).

I've tried adding the urbanairship dependency in many different ways, from working with the original project using the migration process to android studio folders as they were handed over to removing it altogether from the original project and importing it from scratch and every possible permutation between.

It will install onto the device, it doesn't crash, it also doesn't do most of what it's supposed to do, and the logcat (errors only) gives me this:

Failed to find provider info for xxxx.urbanairship.provider
- UALib: Failed to insert in UrbanAirshipProvider.
java.lang.IllegalArgumentException: Unknown URL content://xxxx.urbanairship.provider/preferences
at android.content.ContentResolver.insert(ContentResolver.java:1203)
at com.urbanairship.UrbanAirshipResolver.insert(UrbanAirshipResolver.java:77)
at com.urbanairship.PreferenceDataStore$Preference.writeValue(PreferenceDataStore.java:447)
at com.urbanairship.PreferenceDataStore$Preference.access$000(PreferenceDataStore.java:355)
at com.urbanairship.PreferenceDataStore$Preference$1.run(PreferenceDataStore.java:387)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

When I go to the link at UrbanAirshipResolver.java:77 I get this window.

在此处输入图片说明

I attempt to choose source (I have attempted downloading, but yields no results), the jar is in the library, I select it.

在此处输入图片说明

It then shows 'attaching' indefinitely and will repeat the same error every time I run it.

在此处输入图片说明

This is between the application tags in the manifest:

<provider
    android:name="com.urbanairship.UrbanAirshipProvider"
    android:authorities="xxxx.urbanairship.provider"
    android:exported="true"
    android:multiprocess="true"
    android:permission="xxxx.permission.UA_DATA"/>

It's like I'm missing a directory from the original project.

I'm at a total loss, at this stage, of what to do. If this is familiar to anyone, your help and guidance is gratefully accepted.

Is it actually "xxx.urbanairship.provider" ? "xxx" should match the application ID. I would remove the eclipse style library version of Urban Airship and all manifest entries for Urban Airship. Then install it following http://docs.urbanairship.com/platform/android.html . It will automatically merge the manifest values properly. Make sure you set the application ID in the build.gradle file for the app's module.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM