I have an app with main class called com.quarlityaq.quarlityaqcall.QuarlityaqCall.
After finishing programming I’ve changed the app name to “JCall for jobs”
by changing app_name under strings.xml to “JCall for jobs”
android:label="@string/app_name"
android:name="@string/app_name"
On my device it works just fine, but on some other devices it crashes and throws:
java.lang.RuntimeException: Unable to instantiate application com.quarlityaqcall.QuarlityaqCall.JCall for jobs:
java.lang.ClassNotFoundException: com.quarlityaqcall.QuarlityaqCall.JCall for jobs
in loader dalvik.system.PathClassLoader[/data/app-private/com.quarlityaqcall.QuarlityaqCall-1.apk]
Caused by: java.lang.ClassNotFoundException:
com.quarlityaqcall.QuarlityaqCall.JCall for jobs in loader
dalvik.system.PathClassLoader[/data/app-private/com.quarlityaqcall.QuarlityaqCall-1.apk]
I don’t understand why it looks for the class name “JCall for jobs” instead of “QuarlityaqCall”, and why it only happens on some devices?
Application name in manifest refers to your Application class. If you have not implemented your own Application class you should not have name attribute in in your manifest file. If you have implemented one ou should make sure that the attribute refers to correct class.
You should not export the name attribute to strings.xml as it is a technical parameter for your app. Label is the one that is visible to users.