android


Unable find class com.google.firebase.provider.FirebaseInitProvider below API level 21


I am getting error in API level 19 (Kitkat) and it works fine in API 23 & Above. i also enabled MultiDex in gradle file and dependency of multidex. but its not work. Please suggest me a solution.Code is here:
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.trackawesome-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.trackawesome-2, /vendor/lib, /system/lib]]
at android.app.ActivityThread.installProvider(ActivityThread.java:5011)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4582)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4522)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1381)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
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:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.trackawesome-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.trackawesome-2, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.ActivityThread.installProvider(ActivityThread.java:4996)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4582) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4522) 
at android.app.ActivityThread.access$1500(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1381) 
at android.os.Handler.dispatchMessage(Handler.java:110) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:5292) 
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:824) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) 
at dalvik.system.NativeStart.main(Native Method) 
here my gradle file:-
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.trackawesome"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.google.android.gms:play-services:10.2.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:multidex:1.0.1'
testCompile 'junit:junit:4.12'
}
Did you try adding Multidex application class in your AndroidManifest.xml file?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp">
<application
android:name="android.support.multidex.MultiDexApplication" >
...
</application>
</manifest>
Add the following dependency:
dependencies {
compile 'com.android.support:multidex:1.0.1'
}
Read here for more information: Configure Apps with Over 64K Methods | Android Studio

Related Links

How to move up my controls when they would be hidden by the soft keyboard?
encrypting my password using MD5
How to implement 4 buttons in Android App, Eclipse
youtube video 400 network when try to play video
Markers Disappear after re-running the application
how do i get the website in json format?
Android: Async Task with Thread
Can't run android project for cordova 3.x version using eclipse
Circle on canvas has rough edges
How to retrieve the data from database from listview click
Android-Load images into Listview
Sync app data over cloud to website
How to determine when user slides to another tab in FragmentActivity?
Show gone view in Android Studio in preview
Jersey 1.8 Client on Android MIME media type application/xml was not found
Android: Is there a better way to create this View that has two States?

Categories

HOME
phpword
gpu
r-googlesheets
ms-access-2016
database-normalization
switch-statement
web-hosting
ado.net
joomla3.0
p2p
heap
jxl
intercom
selenium-ide
flash-player
atlassian
scrolltop
cumulocity
atlassian-stash
google-content-api
ksh
r-mice
displaytag
resourcebundle
beta
game-theory
google-cloud-print
slidetoggle
fable-f#
exchangewebservices
winpe
google-earth
playstation-portable
erb
spring-security4
openwhisk
hibernate-search
sql-delete
imagenet
p4merge
skylink
android-softkeyboard
postgresql-8.4
preloader
stylecop
automapper-5
configurationmanager
activeperl
amq
colorbar
pdf-conversion
template-toolkit
django-1.10
meteor-packages
qtplugin
uicolor
nikeplus-api
beamer
model-associations
i386
dup
firebase-security
google-query-language
hadoop-partitioning
ikiwiki
cycle2
mobiledoc-kit
concept-insights
linklabel
jdi
forwarding
rate-limiting
sapscript
atoi
jsvc
mraid
rrule
nodelist
crowd
sql-scripts
wcm
human-computer-interface
universal-image-loader
spring-remoting
twitter-bootstrap-rails
gwt-openlayers
c++builder-xe5
ebay-lms
stacky
swfobject
argouml
pdfviewer
redis-py
cgimage
update-statement
mbeans
strsep
event-receiver
dot-emacs
aspmenu
zend-rest
spread
interop-domino
blind

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App