This issue has been coverred a lot of times. e.g. https://docs.newrelic.com/docs/mobile-monitoring/mobile-monitoring-installation/android/troubleshooting-eclipse-configurations
And was answered before. According to these legends, you check Android Private Libraries in Project -> Properties -> Java Build Path -> Order & Export then it works, otherwise you get ClassNotFoundException, typically "your.package.name.MainActivity". But how it really works is a blackbox - what happens to the building process if a developer checkes that checkbox? Why ADT would allow a package to be compiled with MainActivity class left out, and not giving any error?
Logcat has:
--------- beginning of main
I/WhetstoneService( 1526): Receive am_crash event for pid: 16887
W/KloServer( 1526): Aborted broadcast does not supprt for: xyz.my.app
D/SettingsProvider( 722): lookupValue table global cache.fullyMatchesDisk() dropbox:data_app_crash
D/TidaProvider(16910): TidaProvider()
D/SettingsProvider( 722): lookupValue table global cache.fullyMatchesDisk() logcat_for_data_app_crash
V/SettingsInterface( 722): from settings cache , name = dropbox:data_app_crash , value = null
I/octvm_klo( 3169): [am_crash][1454625549]:[16887,0,xyz.my.app,11058758,java.lang.ClassNotFoundException,Didn't find class "xyz.my.app.MainActivity" on path: DexPathList[[zip file "/data/app/xyz.my.app-1/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]],BaseDexClassLoader.java,56]
It took me a few days and I am still stuck here. All the apk files I produced have ClassNotFoundException on MainActivity. Looking into the class.dex file (a part of apk) with dexdump, it's clear that none of my classes are included in the apk, not only MainActivity, all classes are left out. Checked:
google play library included from /opt/android-sdk-linux/extras/google/google_play_services/libproject/google-play-services_lib/ (also tried to copy the library from fellow developer who hsa no problem upgrading to ADT 22)
Both target (Android API 5.1.1 and Google API 5.1.1) tried on both the library project and the app project.
Experimented with "Google API (Android 5.1.1)" in Java Build Path checked and unchecked (no differences).
Of course, with "Android Private Libraries" checked.
Every above experiment was done with a proper clean-all and rebuild.