Kotlin class not found when built with jenkins - android

locally on my machine my app built successfully & works fine when clicking to open an Kotlin Activity like:
galleryLayout.setOnClickListener(view -> startActivity(new Intent(PreferencesActivity.this, GalleryActivity.class)));
But after successfully built on Jenkins CI the click action will make app crash:
Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/noodoe/sunray/settings/preferences/gallery/GalleryActivity;
at com.noodoe.sunray.settings.preferences.PreferencesActivity.lambda$setupListener$9(PreferencesActivity.java:248)
at com.noodoe.sunray.settings.preferences.PreferencesActivity.access$lambda$9(PreferencesActivity.java)
at com.noodoe.sunray.settings.preferences.PreferencesActivity$$Lambda$10.onClick(Unknown Source)
at android.view.View.performClick(View.java:5226)
at android.view.View$PerformClick.run(View.java:21266)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:168)
at android.app.ActivityThread.main(ActivityThread.java:5845)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
Caused by java.lang.ClassNotFoundException: Didn't find class "com.noodoe.sunray.settings.preferences.gallery.GalleryActivity" on path: DexPathList[[zip file "/data/app/com.noodoe.sunray.alpha-1/base.apk"],nativeLibraryDirectories=[/data/app/com.noodoe.sunray.alpha-1/lib/arm, /data/app/com.noodoe.sunray.alpha-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.noodoe.sunray.settings.preferences.PreferencesActivity.lambda$setupListener$9(PreferencesActivity.java:248)
at com.noodoe.sunray.settings.preferences.PreferencesActivity.access$lambda$9(PreferencesActivity.java)
at com.noodoe.sunray.settings.preferences.PreferencesActivity$$Lambda$10.onClick(Unknown Source)
at android.view.View.performClick(View.java:5226)
at android.view.View$PerformClick.run(View.java:21266)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:168)
at android.app.ActivityThread.main(ActivityThread.java:5845)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
here's my build.gradle, please help if you have any idea. Thanks!

Run gradle clean and retry the build. Not sure about your Jenkins script and how your CI workflow runs, but a clean before the build is always recommended.
Why not post your Jenkinsfile / Jenkins CI script here =)

Related

How to define MultiDex and ProGuard rules in order to prevent "NoClassDefFoundError" in Android using GooglePlus login?

My game has an GooglePlus button to let users login with Google. After pressing the button, it shows a popup that contains user's Google accounts. After selecting one of them, app crashes.
This crash shows up after I upgraded all Google Play dependencies from version 10.2.1 to 16.0.0. My game uses both MultiDex and ProGuard.
Probably, I need to add rules in multidex's keep and proguard's config files. I tried my best but couldn't find a solution.
Here are logs:
Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/plus/internal/zzg;
at com.google.android.gms.plus.internal.zzh.createServiceInterface(Unknown Source)
at com.google.android.gms.common.internal.BaseGmsClient$zzf.zzm(Unknown Source:17)
at com.google.android.gms.common.internal.BaseGmsClient$zza.zza(Unknown Source:12)
at com.google.android.gms.common.internal.BaseGmsClient$zzc.zzo(Unknown Source:11)
at com.google.android.gms.common.internal.BaseGmsClient$zzb.handleMessage(Unknown Source:48)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6316)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
Caused by java.lang.ClassNotFoundException: com.google.android.gms.plus.internal.zzg
at java.lang.VMClassLoader.findLoadedClass(VMClassLoader.java)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.android.gms.plus.internal.zzh.createServiceInterface(Unknown Source)
at com.google.android.gms.common.internal.BaseGmsClient$zzf.zzm(Unknown Source:17)
at com.google.android.gms.common.internal.BaseGmsClient$zza.zza(Unknown Source:12)
at com.google.android.gms.common.internal.BaseGmsClient$zzc.zzo(Unknown Source:11)
at com.google.android.gms.common.internal.BaseGmsClient$zzb.handleMessage(Unknown Source:48)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6316)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
Caused by java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/plus/zza;
at com.google.android.gms.plus.internal.zzh.createServiceInterface(Unknown Source)
at com.google.android.gms.common.internal.BaseGmsClient$zzf.zzm(Unknown Source:17)
at com.google.android.gms.common.internal.BaseGmsClient$zza.zza(Unknown Source:12)
at com.google.android.gms.common.internal.BaseGmsClient$zzc.zzo(Unknown Source:11)
at com.google.android.gms.common.internal.BaseGmsClient$zzb.handleMessage(Unknown Source:48)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6316)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
Caused by java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.internal.plus.zza" on path: DexPathList[[zip file "/data/app/com.example.mobile.example.android-2/base.apk"],nativeLibraryDirectories=[/data/app/com.example.mobile.example.android-2/lib/arm, /data/app/com.example.mobile.example.android-2/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.android.gms.plus.internal.zzh.createServiceInterface(Unknown Source)
at com.google.android.gms.common.internal.BaseGmsClient$zzf.zzm(Unknown Source:17)
at com.google.android.gms.common.internal.BaseGmsClient$zza.zza(Unknown Source:12)
at com.google.android.gms.common.internal.BaseGmsClient$zzc.zzo(Unknown Source:11)
at com.google.android.gms.common.internal.BaseGmsClient$zzb.handleMessage(Unknown Source:48)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6316)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
Google's documentation says that below:
Note: ProGuard directives are included in the Play services client
libraries to preserve the required classes. The Android Plugin for
Gradle automatically appends ProGuard configuration files in an AAR
(Android ARchive) package and appends that package to your ProGuard
configuration. During project creation, Android Studio automatically
creates the ProGuard configuration files and build.gradle properties
for ProGuard use. To use ProGuard with Android Studio, you must enable
the ProGuard setting in your build.gradle buildTypes. For more
information, see the ProGuard guide.
Any suggestions?

Android Application crashed when share debug APK from output folder

I am working on one application that have only one screen barcode scanning and I am achieve this with zxing Library. But my problem is if I am install app with android studio it is working fine but if I share this apk from output folder with Bluetooth, Email, Xender, etc.. Application is install but when I open the app it will crash and Exception is NoClassFoundException.
Here is Logcat:
FATAL EXCEPTION: main
Process: com.jenex.cartracking, PID: 31223
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.jenex.cartracking/com.jenex.cartracking.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.jenex.cartracking.MainActivity" on path: DexPathList[[zip file "/data/app/com.jenex.cartracking-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3029)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3300)
at android.app.ActivityThread.access$1000(ActivityThread.java:211)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1705)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6946)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.jenex.cartracking.MainActivity" on path: DexPathList[[zip file "/data/app/com.jenex.cartracking-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.Instrumentation.newActivity(Instrumentation.java:1094)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3019)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3300) 
at android.app.ActivityThread.access$1000(ActivityThread.java:211) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1705) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:145) 
at android.app.ActivityThread.main(ActivityThread.java:6946) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) 
Suppressed: java.lang.ClassNotFoundException: com.jenex.cartracking.MainActivity
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 13 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
You have to clean build before share the app and make a debug build.
Follow this simple steps,
Goto Build -> Clean Project
Goto Build -> Build Apk
This will generate build Apk. Share this Apk.
Hope this helps.
It seems like I have the same problem. Such an exception happens now with any project, even with empty and clean just created. I used to share myproject_debug.apk with testers, but now it crashes on start up. Maybe it started after some update of Android Studio or platform-tools, I'm not sure.
So, I found some work around that work for me
Before copy project-debug.apk from output folder:
go to menu in Android Studio and open menu 'Build'
click 'Build APK'
After successful build I copy myproject-debug.apk from output folder and it works well.

After updating Android Studio to 2.3 , my app works fine in device ( Nexus 5X) but it crash every time when i install the apk explicitly

I did these things:
1) Clean the code and remove everything in /build folder.
2) Analyse AndroidManifest.xml file all activities have proper package name as suffix
Multidex is already enabled
These are the Error Logs i got every time.:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.packagename, PID: 25752
java.lang.RuntimeException: Unable to instantiate application
com.android.packagename.BaseApplication:
java.lang.ClassNotFoundException: Didn't find class
"com.android.packagename.BaseApplication" on path: DexPathList[[zip
file
"/data/app/com.android.packagename-1/base.apk"],nativeLibraryDirectories=[/data/app/com.android.packagename-1/lib/arm64,
/system/lib64, /vendor/lib64]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:802)
at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5377)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.ClassNotFoundException: Didn't find class
"com.android.packagename.BaseApplication" on path: DexPathList[[zip
file
"/data/app/com.android.packagename-1/base.apk"],nativeLibraryDirectories=[/data/app/com.android.packagename-1/lib/arm64,
/system/lib64, /vendor/lib64]]
at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at
android.app.Instrumentation.newApplication(Instrumentation.java:992)
at android.app.LoadedApk.makeApplication(LoadedApk.java:796)
at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5377)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Ok try to install instant run for your target api
Or disable instant run from Android studio
More about instant run
Preferences->Build,Execution,Deployment->instant Run
then,
function

When I import Google`s UniversalMusicPlayer to my android studio, it crashed

I am a newcomer who want to learn android.My friend suggested me to read the code of that player,but when I imported the project and compiled it,it crashed...
12-22 20:58:07.755 4870-4870/com.example.android.uamp
E/AndroidRuntime: FATAL EXCEPTION: main Process:
com.example.android.uamp, PID: 4870 java.lang.RuntimeException: Unable
to start activity
ComponentInfo{com.example.android.uamp/com.example.android.uamp.ui.MusicPlayerActivity}:
java.lang.RuntimeException: com.google.android.gms.internal.zzsb$zza:
No acceptable module found. Local version is 0 and remote version is
0. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2448)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
at android.app.ActivityThread.access$1200(ActivityThread.java:163) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371)
at android.os.Handler.dispatchMessage(Handler.java:102) at
android.os.Looper.loop(Looper.java:135) at
android.app.ActivityThread.main(ActivityThread.java:5595) at
java.lang.reflect.Method.invoke(Native Method) at
java.lang.reflect.Method.invoke(Method.java:372) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) Caused
by: java.lang.RuntimeException:
com.google.android.gms.internal.zzsb$zza: No acceptable module found.
Local version is 0 and remote version is 0. at
com.google.android.gms.internal.zzni.zzbg(Unknown Source) at
com.google.android.gms.internal.zzni.zza(Unknown Source) at
com.google.android.gms.cast.framework.CastContext.(Unknown
Source) at
com.google.android.gms.cast.framework.CastContext.getSharedInstance(Unknown
Source) at
com.example.android.uamp.ui.ActionBarCastActivity.onCreate(ActionBarCastActivity.java:141)
at
com.example.android.uamp.ui.BaseActivity.onCreate(BaseActivity.java:49)
at
com.example.android.uamp.ui.MusicPlayerActivity.onCreate(MusicPlayerActivity.java:57)
at android.app.Activity.performCreate(Activity.java:6100) at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1109)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
at android.app.ActivityThread.access$1200(ActivityThread.java:163) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371)
at android.os.Handler.dispatchMessage(Handler.java:102) at
android.os.Looper.loop(Looper.java:135) at
android.app.ActivityThread.main(ActivityThread.java:5595) at
java.lang.reflect.Method.invoke(Native Method) at
java.lang.reflect.Method.invoke(Method.java:372) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: com.google.android.gms.internal.zzsb$zza: No acceptable
module found. Local version is 0 and remote version is 0. at
com.google.android.gms.internal.zzsb.zza(Unknown Source) at
com.google.android.gms.internal.zzni.zzbg(Unknown Source) at
com.google.android.gms.internal.zzni.zza(Unknown Source) at
com.google.android.gms.cast.framework.CastContext.(Unknown
Source) at
com.google.android.gms.cast.framework.CastContext.getSharedInstance(Unknown
Source) at
com.example.android.uamp.ui.ActionBarCastActivity.onCreate(ActionBarCastActivity.java:141)
at
com.example.android.uamp.ui.BaseActivity.onCreate(BaseActivity.java:49)
at
com.example.android.uamp.ui.MusicPlayerActivity.onCreate(MusicPlayerActivity.java:57)
at android.app.Activity.performCreate(Activity.java:6100) at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1109)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
at android.app.ActivityThread.access$1200(ActivityThread.java:163) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371)
at android.os.Handler.dispatchMessage(Handler.java:102) at
android.os.Looper.loop(Looper.java:135) at
android.app.ActivityThread.main(ActivityThread.java:5595) at
java.lang.reflect.Method.invoke(Native Method) at
java.lang.reflect.Method.invoke(Method.java:372) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Well,when I searched for answers,the responses were not useful...
And if you have some wonderful open source project to recommend ,hope you can tell me.Thx.
Sorry for my poor english...
You need to update your google play service of device.
You can see this Bug report which already has been addressed
and possibility you will have to update your gcm dependency then appropriate modifications of code will also required mean the deprecated methods will be needed to replaced with new one in the project for e.g GoogleApiAvailability to register token etc so also make sure you are using the latest gcm dependency in your project

NoClassDefFoundError attempting to use FatSecret REST API in Android Studio

I am using the FatSecretAPI in order to retreive items from their database.
I have used this library - http://ranesr.github.io/fatsecret4j/ and done the following:
Created a new module in Android Studio as a new Java Library
Copied the relevant java files across as per the structure provided in the link
Located File > Project Structure... > Modules > my app > Dependencies and added the fatsecret module as a dependency
Called the FatSecretAPI class and instantiated with both my keys as per:
FatSecretAPI api = new FatSecretAPI("my auth key", "my shared key");
Cleaned and Rebuilt the project.
Upon running the app and opening the activity this call is in, I get the following error:
FATAL EXCEPTION: main
Process: com.example.chris.rapical, PID: 7140
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/fatsecret/platform/FatSecretAPI;
at com.example.chris.rapical.FoodSearchOnlineActivity.onCreate(FoodSearchOnlineActivity.java:51)
at android.app.Activity.performCreate(Activity.java:6500)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3072)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3218)
at android.app.ActivityThread.access$1000(ActivityThread.java:198)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1676)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6837)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.fatsecret.platform.FatSecretAPI" on path: DexPathList[[zip file "/data/app/com.example.chris.rapical-1/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.example.chris.rapical.FoodSearchOnlineActivity.onCreate(FoodSearchOnlineActivity.java:51) 
at android.app.Activity.performCreate(Activity.java:6500) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3072) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3218) 
at android.app.ActivityThread.access$1000(ActivityThread.java:198) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1676) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:145) 
at android.app.ActivityThread.main(ActivityThread.java:6837) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) 
Suppressed: java.lang.ClassNotFoundException: com.fatsecret.platform.FatSecretAPI
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 15 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
Things I have tried:
Cleaning and rebuilding the app
Deleting the /class folder and re-building
Running 'gradlew clean' on CMD at project location
All 3 have no successs.
Figured it out - When I was going to create the new Module, I selected Java library instead of Android library. Duh.

Categories

Resources