I've tried everything I could think of, but still I cannot run my tests using Robotium.
I set the robotium library and my main project to be exported in the Project configuration as suggested here
I've set the android:debuggable flag to true as suggested here
I also checked the android:targetPackage is set properly in the manifest as suggested here
Also tried to change the scope of the main project dependency when building the test module to Provided instead of Compile (I am not sure what that does...)
Here is the AndroidManifest for the Test project:
<?xml version="1.0" encoding="utf-8"?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.matthieu.tests"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="4"
android:targetSdkVersion="17" />
<application
android:debuggable="true">
<uses-library android:name="android.test.runner"/>
</application>
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.matthieu"
android:label="Tests for com.matthieu"/>
</manifest>
And here is the exception I get:
java.lang.RuntimeException: Exception during suite construction
at android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests.testSuiteConstructionFailed(TestSuiteBuilder.java:239)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:520)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)
Caused by: java.lang.reflect.InvocationTargetException
at com.matthieu.MainMenuActivityTest.<init>(MainMenuActivityTest.java:26)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.test.suitebuilder.TestMethod.instantiateTest(TestMethod.java:87)
at android.test.suitebuilder.TestMethod.createTest(TestMethod.java:73)
at android.test.suitebuilder.TestSuiteBuilder.addTest(TestSuiteBuilder.java:263)
at android.test.suitebuilder.TestSuiteBuilder.build(TestSuiteBuilder.java:185)
at android.test.InstrumentationTestRunner.onCreate(InstrumentationTestRunner.java:373)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4218)
at android.app.ActivityThread.access$3000(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: com.matthieu.MainMenuActivity
... 19 more
Note also that I see a few errors like this in the logcat:
01-04 14:44:51.822: WARN/dalvikvm(1263): Class resolved by unexpected DEX: Lcom/matthieu/MainMenuActivity;(0x44e7f980):0x249f70 ref [Lcom/actionbarsherlock/app/SherlockFragmentActivity;] Lcom/actionbarsherlock/app/SherlockFragmentActivity;(0x44e7f980):0x121770
01-04 14:44:51.833: WARN/dalvikvm(1263): (Lcom/matthieu/MainMenuActivity; had used a different Lcom/actionbarsherlock/app/SherlockFragmentActivity; during pre-verification)
01-04 14:44:51.851: WARN/dalvikvm(1263): Unable to resolve superclass of Lcom/matthieu/MainMenuActivity; (644)
01-04 14:44:51.851: WARN/dalvikvm(1263): Link of class 'Lcom/matthieu/MainMenuActivity;' failed
01-04 14:44:51.851: ERROR/dalvikvm(1263): Could not find class 'com.matthieu.MainMenuActivity', referenced from method com.matthieu.MainMenuActivityTest.testFirstTimeAppOpening
01-04 14:44:51.851: WARN/dalvikvm(1263): VFY: unable to resolve check-cast 849 (Lcom/matthieu/MainMenuActivity;) in Lcom/matthieu/MainMenuActivityTest;
If it makes any difference, I am using IntelliJ Idea (11.1.5), SDK 17, SDK Tools 21.0.1 and updated Robotium to 3.6
UPDATE:
Found one related discussion here. I can see different error messages whether I run only one test or all the tests, and my application does use FragmentActivity. But no matter what I do, I am not able to run any test (not one, not all)...
This type of errors occured when you did the below things.
1.If you entered wrong package name for "android:targetPackage" in manifest file.
so please check the target package name in the manifest file.
2.If you add the same library for both android app and test project.
Ambiguity occurs when you add same library for both android app and test project.so please add the library to app project only.
Finally.... I found the only way I could find to make it work there
Do not keep the Robotium test cases in a separate module... no idea why there is no way to make it work, but really I tried everything I could think of or I could find around.
I had this problem for a while and tried many things, what worked for me in the end was simply going into
properties -> Java build path -> Projects
for the test project and then removing the project under test and adding it again. (Since i cannot reproduce the problem and don't remember the details, it may be safest to remove the project under test, then clean both project, and then add the project under test)
I experienced the same problem again (see my other answer on this page) but could not solve the problem with my own solution this time. This time i found another solution: Removing the private libraries for the test project by right clicking on the test project and then
properties -> Java build path -> Libraries
and removing "Android Private Libraries"
PS My answer was inspired by information i found on this page: http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17
I face same problem. its happen just because of i was trying to test my project with the JUnit instead of Android JUnit test.
so for that make test project right click on it > run as > Android Junit test.
it has work in my case.
best of luck
Related
I am getting this error when I try to run my App:
E/AndroidRuntime(2314): java.lang.RuntimeException:
Unable to create application in.mubble.billbytwo.GlobalApp:
java.lang.IllegalStateException: Module adapter for class
in.mubble.billbytwo.RootModule could not be loaded.
Please ensure that code generation was run for this module.
I think I am using Ant based build system I am not sure though, this is my first dagger project and I am on Eclipse IDE.
PS: I have already tried adding java-writer and dagger-compiler to factory paths as some other posts suggests but no luck.
here is a full stack trace:
FATAL EXCEPTION: main
Process: in.mubble.billbytwo, PID: 2314
java.lang.RuntimeException:
Unable to create application in.mubble.billbytwo.GlobalApp:
java.lang.IllegalStateException: Module adapter for class
in.mubble.billbytwo.RootModule could not be loaded.
Please ensure that code generation was run for this module.
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4347)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller
.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException:
Module adapter for class
in.mubble.billbytwo.RootModule could not be loaded.
Please ensure that code generation was run for this module.
at dagger.internal.FailoverLoader$1.create(FailoverLoader.java:45)
at dagger.internal.FailoverLoader$1.create(FailoverLoader.java:40)
at dagger.internal.Memoizer.get(Memoizer.java:56)
at dagger.internal.FailoverLoader.getModuleAdapter(FailoverLoader.java:57)
at dagger.internal.Modules.loadModules(Modules.java:43)
at dagger.ObjectGraph$DaggerObjectGraph.makeGraph(ObjectGraph.java:174)
at dagger.ObjectGraph$DaggerObjectGraph.access$000(ObjectGraph.java:138)
at dagger.ObjectGraph.create(ObjectGraph.java:129)
at in.mubble.billbytwo.Injector.init(Injector.java:13)
at in.mubble.billbytwo.Injector.init(Injector.java:24)
at in.mubble.billbytwo.GlobalApp.onCreate(GlobalApp.java:67)
at android.app.Instrumentation
.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
Please Help how to resolve this.
It is important to be certain that code-generation is happening. Check your build directories to ensure that this class is actually being generated. I've not used Ant with Dagger, but for sure you need to ensure that dagger-compiler-${version}.jar is available to javac, so check in your classes folders and see if the code is being generated at all. If not, it's a build configuration issue.
If it is, then you need to check your proguard configuration and ensure that it is keeping anything that inherits from ModuleAdapter and Binding. This is crucial because Dagger 1.x dynamically loads adapters, and therefore there is no static dependency in the code that can inform Proguard to leave it alone. So it is possible that Proguard has simply removed the adapter code, and therefore Dagger cannot load it.
(Note, this problem will be eliminated in Dagger 2)
The same error message appears when you initialize Dagger's object graph in the application class but then forget to register this application class in AndroidManifest.xml.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.andro">
<application
android:name=".MyDaggerApplication"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
</application>
</manifest>
Well, for someone come to this thread later, I think this problem might be cause by the "typo" of Injector.init(Object).
Injector.init(this);
Should be
Injector.inject(this);
Or just that you forgot to check the following option on Eclipse:
Java Compiler > Annotation Processing > Enable project specific settings
from Square Dagger IllegalStateException: Module adapter for class MyApplicationModule could not be loaded
I've got a problem involving ClassNotFoundException. When i "Run as android application" from eclipse it works fine, but when i download it from Google Play (same source code but "Exported as signed app") it crashes with the following stacktrace:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.larphoid.aeboing/com.larphoid.aeboing.BoingBoing}: java.lang.ClassNotFoundException: com.larphoid.aeboing.BoingBoing in loader dalvik.system.PathClassLoader[/data/app/com.larphoid.aeboing-1.apk]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2703)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2797)
at android.app.ActivityThread.access$2300(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2132)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4914)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.larphoid.aeboing.BoingBoing in loader dalvik.system.PathClassLoader[/data/app/com.larphoid.aeboing-1.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
at android.app.Instrumentation.newActivity(Instrumentation.java:1033)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2695)
... 11 more
I've never had this problem before, and i'm not experienced yet in "reading" Stacktraces, so i'm pretty much puzzled at this. If anyone has some pointers or solution i'd appreciate it.
Thanks.
Gonna copy this from another question as I had the exact same problem before, and this is how I fixed it:
If you're running adt rev 22, you might not be exporting your libraries. I don't know why
Google did this exactly, but in the newest revolution you have to
check to make sure you're exporting your libraries yourself.
Right click your project, click Properties, and check Order & Export
under Java Build Path. It should look like this if you want to export
everything:
Afterwards, rebuild the application and export it again. It should be working now. To test, simply install the .apk to your phone manually before putting it on the store to make sure it works.
ClassNotFoundException indicates that something is missing on the classpath. Maybe you are missing a library in the classpath.
As the name suggests classNotFoundException in Java is a subclass of java.lang.Exception and Comes when Java Virtual Machine tries to load a particular class and doesn't found the requested class in classpath.
Maybe you change your package name while signing your apk.
Check your package and class name
We have very weird java.lang.ClassNotFoundException on app startup that happens to very small amount of customers (< 1%). We never saw it in dev env and we cannot understand the source of this issue. Here is the stack trace from Google play crash reports.
java.lang.RuntimeException: Unable to instantiate application com.mycompany.myapplication.MyApplication: java.lang.ClassNotFoundException: com.mycompany.myapplication.MyApplication in loader dalvik.system.PathClassLoader[/mnt/asec/com.mycompany.myapplication-1/pkg.apk]
at android.app.LoadedApk.makeApplication(LoadedApk.java:490)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3784)
at android.app.ActivityThread.access$2200(ActivityThread.java:132)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1082)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4268)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.mycompany.myapplication.MyApplication in loader dalvik.system.PathClassLoader[/mnt/asec/com.mycompany.myapplication-1/pkg.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.app.Instrumentation.newApplication(Instrumentation.java:972)
at android.app.LoadedApk.makeApplication(LoadedApk.java:481)
... 11 more
If the issue only occurs on with signed APKs and you are using Eclipse to Export the Signed APK ...
Before you 'Export and sign an APK' in Eclipse turn off the following setting in the menu [Project > Build Automatically] (then can switch it back on later when you continue developing).
I recently deployed an update to my app, and a user reported a crash the very next day via the Google Play reporting facility. The stack dump was for LoadApk() and the error was in the loading of my Application class. Here is that dump:
java.lang.RuntimeException: Unable to instantiate application com.goalstate.WordGames.FullBoard.library.FullBoardApplication: java.lang.ClassNotFoundException: Didn't find class "com.goalstate.WordGames.FullBoard.library.FullBoardApplication" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:516)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4703)
at android.app.ActivityThread.access$1600(ActivityThread.java:175)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1368)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5602)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.goalstate.WordGames.FullBoard.library.FullBoardApplication" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.Instrumentation.newApplication(Instrumentation.java:981)
at android.app.LoadedApk.makeApplication(LoadedApk.java:511)
... 11 more
I have a library and my Application class was defined in that library. The manifest for my app (which used the library) referred to the class in that library by its full path. It did not have an application class of its own.
All of my in-house testing had not reproduced this problem, and even when I tested (using the Samsung Remote Test Lab) on the same device (actually two different devices, one running 4.3 and one running 4.4.4) as reported the crash (a Galaxy Note II, running Android 4.4), there was no problem.
In searching for information on this I found mention of the fact that different devices may have slightly different approaches to resolving class references, and that is probably why most devices had no problem with my APK, but this particular device (which, unlike my test devices, was provided with its Android flavor by Sprint) did. And similarly, it may be why just one percent of your own customers had the problem, while most did not.
I decided that the best approach would be to make it as easy as possible for even an unsophisticated device to find the classes that were referenced from my manifest file. So, I defined a new application class within the package of the app itself (rather than the library) and I had that class inherit from the application class in my library. The new class was otherwise empty.
I then replaced the full path reference to the application class in the library with a relative reference to the new class I had created in the app itself. So, instead of having:
<application android:name="com.goalstate.WordGames.FullBoard.library.FullBoardApplication"
in my manifest, I had:
<application android:name=".FullBoardWordChumsApplication"
That (according to folklore on this topic) should make it easier for a less sophisticated resolution process to succeed.
I also took the full path that I had been using in the manifest to name my already-local activity class and made it relative (by simply lopping off everything preceding the final dot).
Additional folklore found online indicates that it may help to turn off "Build Automatically" for the project in Eclipse, then exit Eclipse, re-enter Eclipse, and then, after it rebuilds, go directly to Android Tools to export the signed APK (without ever turning on Build Automatically). So, throwing salt over my left shoulder, and saying a prayer to the gods of fragmentation paranoia, I accommodated this superstition in preparing my APK for release.
Does any of this really help? Time will tell, but so far my updated release has not generated any additional crashes.
This Error occurs when in your manifest file in application tag whatever class name you put it is not match with your coding java file .So make a current both in way.
In my application I use RoboGuice and the configuration for RoboGuice requires to add an Application-class and specify it in the AndroidManifest.xml file in the application-tag using the 'android:name' attribute.
So this is how my applicaiton-tag in the manifest looks like:
<application android:label="Worktime" android:icon="#drawable/logo" android:name=".guice.Application">
This always works and still does when I compile inside my IDE (IntelliJ) and deploy it to my device.
However when I want to run my tests using Ant (and only via Ant, this also still works in the IDE) I have this error on the console:
[exec] android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests:INSTRUMENTATION_RESULT: shortMsg=Unable to instantiate application eu.vranckaert.worktime.guice.Application: java.lang.ClassNotFoundException: eu.vranckaert.worktime.guice.Application in loader dalvik.system.PathClassLoader#44e88928
[exec] INSTRUMENTATION_RESULT: longMsg=java.lang.RuntimeException: Unable to instantiate application eu.vranckaert.worktime.guice.Application: java.lang.ClassNotFoundException: eu.vranckaert.worktime.guice.Application in loader dalvik.system.PathClassLoader#44e88928
This has worked before but started failing since I upgraded my 'Android SDK Tools' to revision 17 and the 'Android SDK Platform-tools' to revision 11.
Anyone who had this issue also or who knows how to fix it?
I think that the error saying
java.lang.ClassNotFoundException:
is occur only when you have create new class Activity and not declare(register) that in manifest file
please check if you have any new activity and not declare(register) that activity in manifest file
Thanks.
we might have encountered the same error - In my case the solution was to separate the Ant targets to two calls (i.e. "ant myParameters myTarget1 myTarget2", and "ant myParameters debug delivery"). Hope this works for you, anyhow - Google need to add better support for their undocumented/faulty changes (and stackoverflow isn't the best place for questions that are not originated in stupidity, as the lifetime of a complex question isn't too long here).
I have a ContentProvider class and is declared in AndroidMenifest.xml like this:
<provider android:name=".MediaSearchProvider"
android:authorities="org.iii.romulus.meridian.mediasearch">
<path-permission android:path="/search_suggest_query"
android:readPermission="android.permission.GLOBAL_SEARCH" />
</provider>
It works well on most devices, but the Market tells me some users are suffering error with it. The stack trace is:
java.lang.RuntimeException: Unable to get provider org.iii.romulus.meridian.MediaSearchProvider: java.lang.ClassNotFoundException: org.iii.romulus.meridian.MediaSearchProvider in loader dalvik.system.PathClassLoader[/mnt/asec/org.iii.romulus.meridian-1/pkg.apk]
at android.app.ActivityThread.installProvider(ActivityThread.java:4509)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4281)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4237)
at android.app.ActivityThread.access$3000(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: org.iii.romulus.meridian.MediaSearchProvider in loader dalvik.system.PathClassLoader[/mnt/asec/org.iii.romulus.meridian-1/pkg.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
at android.app.ActivityThread.installProvider(ActivityThread.java:4494)
... 12 more
I have totally no idea about what's up and I can't reproduce it on any of my phones. I also tried clean and build, but the report still comes up.
Anyone can help? Thanks!
The answers regarding proguard are incorrect. This would cause an easily reproducible error on every phone, every time, because the ContentProvider class would be completely missing. The developer clearly states that they cannot reproduce the error, meaning that the ContentProvider class is present but for some reason is not being found on one of their user's phones.
I have the same crash reported in the market for my app. The stack traces look identical, and the error is occurring at installProvider. I have about 15 test phones in my office and none of them can reproduce this problem. Any other ideas would be appreciated.
Fully qualified names in the manifest are only necessary if your java package names are not the same as your android package name. If a fully qualified name is not specified, the OS will automatically prepend the android package name to the class name specified in the manifest.
Ensure twice that you have correct qualified class name specified in AndroidManifest.xml, it must read something like this:
<provider
android:authorities="org.iii.romulus.meridian.mediasearch"
android:name="org.iii.romulus.meridian.MediaSearchProvider">
</provider>
Notice that #name is fully qualified.
This sounds similar to an issue I had that was caused by an issue with the ClassLoader, see here: Bizarre behaviour when using Apache Commons lib in Android
This bug discusses an error relating to the class loader failing sometimes. The fix for me was to add this line:
Thread.currentThread().setContextClassLoader(this.getClassLoader());
in the constructor of the class that was calling the code that was failing.
Proguard excludes all inherited content providers by default with this line (make sure it's in your cfg):
-keep public class * extends android.content.ContentProvider
If you have any additional inheritance you should exclude it as well or exclude your specific Content Provider class, for example:
-keep public class org.iii.romulus.meridian.MediaSearchProvider
This is an old thread, and the OP didn't have the same ContentProvider declaration as me, but I had the same exact error, so I want to share my findings, in case it helps anyone.
For me, what caused the problem was that the ContentProvider declaration in the AndroidManifest.xml had an exported attribute set to true:
android:exported="true"
Removing it fixed the problem for me. (I didn't really need it)
If your app has grown large enough to require Multidexing and your app is not set up correctly as a Multidex app you will get this error. To set up your app as a multidex app, follow these directions:
Setup multidex app