MyApplication is never used - android-studio

I'm trying to use the class "MyApplication". but I got messages such as my title. first of all, I added as (android:name = ".MyApplication"). and also added ( android:allowBackup="true"). but You can see my second screenshot. The Notice said MyApplication is an unresolved class... What should I do for resolving it?
java.lang.RuntimeException: Unable to instantiate application
com.example.todolist.MyApplication: java.lang.ClassNotFoundException: Didn't
find class "com.example.todolist.MyApplication"
Caused by: java.lang.ClassNotFoundException: Didn't find class
"com.example.todolist.MyApplication" on path:/

Related

Provider com.sap.cloud.sdk.cloudplatform.connectivity.CertificateBasedHttpClientFactory not a subtype

In SAP Cloud SDK FAQ page, there is a QA about I'm Observing a DefaultHttpClientFactory not a subtype Exception, now I encountered a similar error Provider com.sap.cloud.sdk.cloudplatform.connectivity.CertificateBasedHttpClientFactory not a subtype, however I could not exclude connectivity-scp-cf since this is mandatory?
Any hints how to solve this error?
Caused by: com.sap.core.connectivity.jco.cf.auth.TokenFactory$GetTokenException: Could not get ClientCredentialsGrantAccessToken
at com.sap.core.connectivity.jco.cf.auth.TokenFactory.getClientCredentialsGrantAccessToken(TokenFactory.java:61)
at com.sap.core.connectivity.jco.cf.destination.ConnectivityConfigurationCF.getConfiguration(ConnectivityConfigurationCF.java:72)
... 92 more
Caused by: java.lang.NoClassDefFoundError: com/sap/cloud/security/client/HttpClientFactory : cannot initialize class because prior initialization attempt failed
at com.sap.core.connectivity.jco.cf.auth.TokenFactory.executeTokenExchange(TokenFactory.java:94)
at com.sap.core.connectivity.jco.cf.auth.TokenFactory.getClientCredentialsGrantAccessToken(TokenFactory.java:57)
... 93 more
Caused by: java.lang.ExceptionInInitializerError: java.util.ServiceConfigurationError: com.sap.cloud.security.client.HttpClientFactory: Provider com.sap.cloud.sdk.cloudplatform.connectivity.CertificateBasedHttpClientFactory not a subtype
Interface type com.sap.cloud.security.client.HttpClientFactory is part of dependency com.sap.cloud.security.xsuaa:token-client.
When using SAP Java Buildpack (e.g. for JCo), please make sure to give this dependency a provided scope. Otherwise you'll be experiencing class loading issues like in your current case. For further errors, please attach your mvn dependency:tree.

Speech-To-Text App Error

I cannot make a simple Speech-To-Text app work (I'm new to Java). I have been working on this code for several days and refuses to launch due to these errors:
08-13 12:35:08.784 26041-26041/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.blindnavi.navirecog2, PID: 26041
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.blindnavi.navirecog2/com.blindnavi.navirecog2.NaviVoice}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2819)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2988)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1631)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:117)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:149)
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:29)
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:54)
at android.support.v7.app.AppCompatDelegateImplV23.<init>(AppCompatDelegateImplV23.java:31)
at android.support.v7.app.AppCompatDelegateImplN.<init>(AppCompatDelegateImplN.java:31)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:198)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:183)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:519)
at android.support.v7.app.AppCompatActivity.findViewById(AppCompatActivity.java:190)
at com.blindnavi.navirecog2.NaviVoice.<init>(NaviVoice.java:17)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1086)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2809)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2988) 
at android.app.ActivityThread.-wrap14(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1631) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.app.ActivityThread.main(ActivityThread.java:6682) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) 
I do not know what most of these errors mean so i cannot fix the program myself. Please leave your suggestions below!
Your help is appreciated!
As discussed in another stackoverflow question Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference
An Activity is not fully initialized and ready to look up views until after setContentView(...) is called in onCreate().
So only declare the fields uninitialized and then assign the values in onCreate:

getRowCount() method on viewPanel control & database full text index error

I have simple code to count the rows in view panel control:
getComponent("viewPanel1").getRowCount()
Error calling method 'getRowCount()' on java class 'com.ibm.xsp.component.xp.XspViewPanel'
Stack trace shows the details as below:
Caused by: com.ibm.jscript.InterpretException: Script interpreter error, line=1, col=64: Error calling method 'getRowCount()' on java class 'com.ibm.xsp.component.xp.XspViewPanel'
Caused by: com.ibm.xsp.FacesExceptionEx: Notes error: The full text index for this database is in use
Caused by: NotesException: Notes error: The full text index for this database is in use
at lotus.domino.local.View.FTSearchSorted(Unknown Source)
Any quick solution to avoid these errors on server?
This is, in fact, a server issue. Take a look here or google it to fine-tune your server.

Getting a custom class to be recognized as an fxml tag

I have a custom textfield, PersistentPromptTextField that extends TextField and would like to be able to add it my .fxml file. When I do and I run it, I get a list of errors such as this:
Caused by: java.lang.InstantiationException: gui.PersistentPromptTextField
at java.lang.Class.newInstance(Unknown Source)
at sun.reflect.misc.ReflectUtil.newInstance(Unknown Source)
... 75 more
Caused by: java.lang.NoSuchMethodException: gui.PersistentPromptTextField.<init>()
at java.lang.Class.getConstructor0(Unknown Source)
... 77 more
In my .fxml file I have included <?import gui.PersistentPromptTextField?> as well, but obviously I am missing something.
The error raised due to the FXMLLoader is (by default) tried to instantiate the given class using its a no-arg constructor. If you didn't define, try it.
Instantiating using a constructor having some arguments, you need to use #NamedArgs annotation. See this comprehensive answer for more details.

javax.el.PropertyNotFoundException: Property 'InfoController' not found on type com.ui.InfoTemplate

Hi I am trying to migrating my application from WAS 6.0 to WAS 8.5 with minimal code change. My application is written in JSF 1.1 which is not supported in WAS8.5. I have written its getters and setters also. This application is working fine in WAS6.0/6.1 but while running in WAS8.5 it is showing Exceptions. What all Jars i have to add in my project so that it will work. I am getting following exceptions:
javax.el.ELException: Property 'InfoController' not found on type com.ui.InfoTemplate javax.faces.el.EvaluationException: javax.el.ELException: Property 'InfoController' not found on type com.ui.InfoTemplate
at org.apache.myfaces.el.convert.ValueExpressionToValueBinding.getValue(ValueExpressionToValueBinding.java:169)
at com.utilities.JsfUtility.getManagedBean(JsfUtility.java:107)
at com.ui.LandingPageController.getInfo(LandingPageController.java:92)
Caused by: javax.el.ELException: Property 'InfoController' not found on type com.ui.InfoTemplate
at org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(VariableResolverToELResolver.java:127)
Caused by: javax.faces.el.EvaluationException: Property 'InfoController' not found on type com.ui.InfoTemplate
at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:80)
Caused by: javax.el.PropertyNotFoundException: Property 'InfoController' not found on type com.ui.InfoTemplate
at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:232)
at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:209)
You've an EL syntax error. The exception message suggests that you've something like
public class InfoTemplate {
public InfoController getInfoController() {
return infoController;
}
}
And that you're attempting to access the property as InfoController:
#{infoTemplate.InfoController}
This is wrong. The property name, when not starting with 2 capitals or more, must start with lowercase.
#{infoTemplate.infoController}
I'm not sure how it worked in older WAS version. It should have failed the same way over there.

Resources