I am trying to launch an apk through adb command, soon after installing the apk but i am getting ClassNotFoundException and app is crashing.
My Log :
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.sample.test.one/com.sample.test.one.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.sample.test.one.MainActivity" on path: DexPathList[[zip file "/data/app/com.sample.test.one-1/base.apk"],nativeLibraryDirectories=[/data/app/com.sample.test.one-1/lib/arm, /system/lib, /vendor/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2849)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1518)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.sample.test.one.MainActivity" on path: DexPathList[[zip file "/data/app/com.sample.test.one-1/base.apk"],nativeLibraryDirectories=[/data/app/com.sample.test.one-1/lib/arm, /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 android.app.Instrumentation.newActivity(Instrumentation.java:1086)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2839)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1518)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
Flow :
adb install test.apk
adb shell am start -n com.sample.test.one/com.sample.test.one.MainActivity
or
adb shell am start -a android.intent.action.Main -n com.sample.test.one/.MainActivity
I am trying above adb shell commands but app is failing to launch but one scenario i have observed, if i will run the code in Android Studio and app gets installed in the device and after that if i will try "adb shell am start" command then it works fine but if i try through "adb install apk" then this command is not working.
I came across this situation once, but after adding MultiDex to my gradle , everything works great.
Step 1
defaultConfig {
minSdkVersion minVersion+
targetSdkVersion targetVersion+
multiDexEnabled true
}
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
Step 2
add gradle
compile 'com.android.support:multidex:1.0.0'
Step 3
Change gradle properties
org.gradle.jvmargs=-Xmx4096m
Please try this trick.
English is not my native language; please excuse typing errors.
Solution:
take a look in your App project file AndroidMainfest.xml , look for the activity contain this
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
in this scope ,remember this activity name property.
use this command
adb shell am start -D -n com.mycompany.moba.lala/com.epicgames.ue4.SplashActivity
replace the com.epicgames.ue4.SplashActivity with the previous name path.
Related
I'm working on a multi-module project, and after making the transition from the support libraries to AndroidX, ./gradlew connectedCheck fails:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':MyProject:connectedDebugAndroidTest'.
> There were failing tests. See the report at: file:///Users/justinpollard/Dev/android-app/MyProject/build/reports/androidTests/connected/index.html
A bit further up, I see this message:
11:48:13 I/RemoteAndroidTest: Running am instrument -w -r com.myproject.test/androidx.test.runner.AndroidJUnitRunner on Pixel XL - 9
11:48:13 V/ddms: execute: running am instrument -w -r com.myproject.test/androidx.test.runner.AndroidJUnitRunner
11:48:15 V/InstrumentationResultParser: INSTRUMENTATION_RESULT: shortMsg=Process crashed.
11:48:15 I/InstrumentationResultParser: test run failed: 'Instrumentation run failed due to 'Process crashed.''
Starting 0 tests on Pixel XL - 9
Tests on Pixel XL - 9 failed: Instrumentation run failed due to 'Process crashed.'
11:48:15 I/XmlResultReporter: XML test result file generated at /Users/justinpollard/Dev/android-app/MyProject/build/outputs/androidTest-results/connected/TEST-Pixel XL - 9-MyProject-.xml. Total tests 0,
11:48:15 V/InstrumentationResultParser: INSTRUMENTATION_CODE: 0
11:48:15 V/InstrumentationResultParser:
11:48:15 V/ddms: execute 'am instrument -w -r com.myproject.test/androidx.test.runner.AndroidJUnitRunner' on 'HT73Y0200438' : EOF hit. Read: -1
11:48:15 V/ddms: execute: returning
com.android.builder.testing.ConnectedDevice > No tests found.[Pixel XL - 9] FAILED
No tests found. This usually means that your test classes are not in the form that your test runner expects (e.g. don't inherit from TestCase or lack #Test annotations).
This makes it seem like the failure is caused by a test apk crash before the tests can run. When I run one of my connected tests from Android Studio, I see a little more information:
2019-05-13 11:55:55.927 29839-29839/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.myproject, PID: 29839
java.lang.RuntimeException: Unable to instantiate instrumentation ComponentInfo{com.myproject.test/androidx.test.runner.AndroidJUnitRunner}: java.lang.ClassNotFoundException: Didn't find class "androidx.test.runner.AndroidJUnitRunner" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/data/app/com.myproject.test-2MzWVeeaNLfexBOU_5tLPw==/base.apk", zip file "/data/app/com.myproject-Hd0c3YX8pUlOxZVK3mlgMA==/base.apk"],nativeLibraryDirectories=[/system/lib64, /vendor/lib64]]
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5855)
at android.app.ActivityThread.access$1100(ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.test.runner.AndroidJUnitRunner" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/data/app/com.myproject.test-2MzWVeeaNLfexBOU_5tLPw==/base.apk", zip file "/data/app/com.myproject-Hd0c3YX8pUlOxZVK3mlgMA==/base.apk"],nativeLibraryDirectories=[/system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5851)
at android.app.ActivityThread.access$1100(ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Suppressed: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/test/runner/MonitoringInstrumentation;
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
... 10 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.test.runner.MonitoringInstrumentation" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/data/app/com.myproject.test-2MzWVeeaNLfexBOU_5tLPw==/base.apk", zip file "/data/app/com.myproject-Hd0c3YX8pUlOxZVK3mlgMA==/base.apk"],nativeLibraryDirectories=[/system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 13 more
It's surprising to me that AndroidJUnitRunner and MonitoringInstrumentation are not found on the path since I include androidx.text:runner in the app-level build.gradle dependencies:
dependencies {
...
androidTestImplementation(
"androidx.test.ext:junit:1.1.0",
"androidx.test:rules:1.1.0",
"androidx.test:runner:1.1.0",
"androidx.test.espresso:espresso-core:3.1.0",
)
...
}
I've also made sure I'm following the instructions listed here at https://developer.android.com/training/testing/set-up-project:
1) My project build.gradle includes the google() repository (the instructions do say to include this in the app-level build.gradle, but I'm assuming that's incorrect given allprojects exists in the project-level build.gradle?)
2) I've got my dependencies listed in the app-level dependencies.androidTestImplementation (see above)
3) Add useLibrary 'android.test.runner' to the android section of my app build.gradle
4) Add <uses-library android:name="android.test.runner" android:required="false" /> to the app's AndroidManifest.xml (the instructions make it seem like this may not be required since I'm using gradle to run the tests)
For reference, without including an entire test, here's an illustrative example of my setup:
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import androidx.test.ext.junit.runners.AndroidJUnit4;
#RunWith(AndroidJUnit4.class)
public class ExampleTest {
#Before
public void setUp() throws Exception {
// Setup here
}
#After
public void tearDown() {
// Tear down here
}
#Test
public void testExample() {
// Test code here
}
...
}
Can anyone help me get these tests up and running again? Thanks!
I'm trying to create new Android app with Nativescript Angular, build passes ok, but when I try to run it on my device I get an error:
An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{<my-app-id>/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Failed to create JavaScript extend wrapper for class 'com/tns/NativeScriptActivity'
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: com.tns.NativeScriptException: Failed to create JavaScript extend wrapper for class 'com/tns/NativeScriptActivity'
at com.tns.Runtime.createJSInstanceNative(Native Method)
at com.tns.Runtime.createJSInstance(Runtime.java:643)
at com.tns.Runtime.initInstance(Runtime.java:618)
at com.tns.NativeScriptActivity.<init>(NativeScriptActivity.java:12)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1174)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2669)
... 9 more
Reproduction steps:
cd elipay-builds
tns create MyApp --appid <my-app-id> --template ng
cd MyApp
npm install --save-dev nativescript-dev-webpack
npm install
./node_modules/.bin/update-ns-webpack --configs --deps
tns run android
tns build android --bundle
UPDATE 1: I managed to figure out that an issue is somehow connected to the applicationId.
UPDATE 2: If I update id property in my nativescript's package.json file:
{
...
"nativescript": {
"id": "<my-new-app-id>"
},
...
}
I need to assign new applicationId to my app each time I build it. And this is wrong, since stores will recognize my app as different one after the update.
I don't know what else I can try. Please help me.
Thanks :)
I had developed app on android studio 3.0.1, but I got a error when I installed the apk to my cellphone.
Cellphone connect mac by usb, click run button
,the apk will installed and run no error. But if I copy the apk in finder (like this)
to cellphone and install it in phone, there will be an error "APK parsing error".
If install apk by "adb install xxx.apk" ,when open the app, it will crash and logcat as follow:
12-20 16:35:09.562 14658-14658/? I/art: Late-enabling -Xcheck:jni
12-20 16:35:09.562 14658-14658/? I/art: Reinit property: dalvik.vm.checkjni= false
12-20 16:35:09.614 14658-14658/com.xxx.xxx I/InstantRun: starting instant run server: is main process
12-20 16:35:09.620 14658-14658/com.xxx.xxx E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.xxx.xxx, PID: 14658
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.xxx.xxx/com.xxx.xxx.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.xxx.xxx.MainActivity" on path: DexPathList[[zip file "/data/app/com.xxx.xxx-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx.xxx-1/lib/arm64, /data/app/com.xxx.xxx-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /product/lib64]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2695)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2867)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1570)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6595)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.xxx.xxx.MainActivity" on path: DexPathList[[zip file "/data/app/com.xxx.xxx-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx.xxx-1/lib/arm64, /data/app/com.xxx.xxx-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /product/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.newActivity(Instrumentation.java:1083)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2685)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2867)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1570)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6595)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
12-20 16:35:09.624 14658-14658/com.xxx.xxx I/Process: Sending signal. PID: 14658 SIG: 9
But if click Bulid>Build APK(s) , then copy the apk in same folder (this : apk)to cellphone, it will install and run with no error...
is it a bug in android studio?
manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxx.xxx">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.CAMERA" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
In new version VS, You shold use "Bulid Apk" menu option to generate the product apk :)
try with disable Instant Run . it find at
Run Goto File -> Settings -> Build,Execution, Deployment -> Instant Run -> Uncheck the checkbox for instant run
before this uninstall previous app from device.
Compiled an APK and tested it successfully on my device, tried it through the Google Play Store and it stops working immediately. This app is a copy of an existing app, since you cannot have the same package name twice I simply renamed the package name in the AndroidManifest.xml, compiled it, tested it and then uploaded it to the Play Store.
I do not understand why the app works when I copy it to a device but the same app fails when loaded through the Play Store. I generated a crash report which I accessed from the Play Store Developer Console. If anyone has experience of successfully duplicating apps on the Store then your help would be appreciated.
java.lang.RuntimeException: Unable to instantiate application de.schildbach.wallet.artbyte.WalletApplication: java.lang.ClassNotFoundException: Didn't find class "de.schildbach.wallet.artbyte.WalletApplication" on path: DexPathList[[zip file "/data/app/de.schildbach.wallet.artbyte-1/base.apk"],nativeLibraryDirectories=[/data/app/de.schildbach.wallet.artbyte-1/lib/arm, /data/app/de.schildbach.wallet.artbyte-1/base.apk!/lib/armeabi, /vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:680)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6395)
at android.app.ActivityThread.access$1800(ActivityThread.java:229)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7325)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.lang.ClassNotFoundException: Didn't find class "de.schildbach.wallet.artbyte.WalletApplication" on path: DexPathList[[zip file "/data/app/de.schildbach.wallet.artbyte-1/base.apk"],nativeLibraryDirectories=[/data/app/de.schildbach.wallet.artbyte-1/lib/arm, /data/app/de.schildbach.wallet.artbyte-1/base.apk!/lib/armeabi, /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.newApplication(Instrumentation.java:1005)
at android.app.LoadedApk.makeApplication(LoadedApk.java:670)
... 9 more
Suppressed: java.lang.ClassNotFoundException: de.schildbach.wallet.artbyte.WalletApplication
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)
... 12 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
The Exception says that build is failed due to class not found on dex path list. Build the apk by cleaning the project and also recompile the native code using the ndk-build command. Then try it on the local device and then upload to play store.
The package name in AndroidManifest.xml is often also used for the code base, e.g. as class name of the activities. If you only rename the package name but leave the Java/dex code unchanged Android will not be able to find some classes as you already have noticed.
Check the AndroidManifest.xml for package relative class names (those that start with a .) and prepend the old package name:
Example
Old package name: org.example.myapp
Old activity name: <activity android:name=".MyActivity" ..>
New package name: com.example.newappname
New activity name: <activity android:name="org.example.myapp.MyActivity" ..>
I have removed the appnext SDK from my project. However, I forgot to remove the appnext install referral receiver. The version passed gradle build without any error or warning even though it should have failed the build! (Since I referenced an SDK that was no longer part of the project). My question is why Android Studio/Gradle didn't at least warned me about it at build time?
Here is the relevant code snippet from my manifest file:
The AppsFlyer Install Receiver is first and will broadcast to all receivers placed below it.
Although the library provides additional services, if you use ProGuard as part of your build process,
it has a light footprint. We only use the ads packages from Google Services.
If you want to optimize the size of your project you can exclude any other packages.
For more details see: https://support.appsflyer.com/hc/en-us/articles/207032126-AppsFlyer-SDK-Integration-Android
-->
<receiver
android:name="com.appsflyer.MultipleInstallBroadcastReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<!-- appnext install referral receiver -->
<receiver
android:name="com.appnext.appnextsdk.ReferralReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
You can also see the exception stack trace below (just a bit too late :( ):
Fatal Exception: java.lang.RuntimeException: Unable to instantiate receiver com.appnext.appnextsdk.ReferralReceiver: java.lang.ClassNotFoundException: Didn't find class "com.appnext.appnextsdk.ReferralReceiver" on path: DexPathList[[zip file "/data/app/com.infibond.infi-1/base.apk"],nativeLibraryDirectories=[/data/app/com.infibond.infi-1/lib/arm, /vendor/lib, /system/lib]]
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2992)
at android.app.ActivityThread.access$1800(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1507)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
Caused by java.lang.ClassNotFoundException: Didn't find class "com.appnext.appnextsdk.ReferralReceiver" on path: DexPathList[[zip file "/data/app/com.infibond.infi-1/base.apk"],nativeLibraryDirectories=[/data/app/com.infibond.infi-1/lib/arm, /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.ActivityThread.handleReceiver(ActivityThread.java:2987)
at android.app.ActivityThread.access$1800(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1507)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
The exception stack trace above is clear to me and very logical. After all I have removed the app next library from my project and that was a left over I forgot. Why it happened is not my question, my question is why the Android Studio would let me compile & build my project without raising a single warning in the gradle console? I have not changed any default lint properties. Moreover, When I open the manifest file now Android Studio, would mark the line "android:name="com.appnext.appnextsdk.ReferralReceiver" as an error. But when I built the project is will not even warn me about that.