illegalstateexception

Cannot create new activity in android studio

老子叫甜甜 提交于 2019-12-09 11:42:58
问题 I keep getting an IllegalStateException error in the event log while creating new activity in android studio: 11:27:15 InvalidReferenceException: Error executing FreeMarker template: The following has evaluated to null or missing: ==> srcDir [in template "root://activities/common/common_globals.xml.ftl" at line 41, column 34] Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use when-presentwhen-missing. (These

IllegalStateException: Cannot use an EntityTransaction while using JTA

前提是你 提交于 2019-12-08 11:06:15
问题 I'm making a project for school using JPA. I'm trying to persist an object but I'm getting an error I can't fix. I've read that I have to use usertransaction instead of entitytransaction but we didn't get much information during this lesson so I don't know a lot about this topic. How can I fix this error and be able to persist it? This is the error I get: java.lang.IllegalStateException: Exception Description: Cannot use an EntityTransaction while using JTA. Here is the code that I use:

Getting 'You need to use a Theme.AppCompat theme (or descendant) with this activity.' while trying to show an AlertDialog from BroadcastReceiver

北慕城南 提交于 2019-12-08 10:28:08
问题 I'm sending a Broadcast from a service and then receiving it back from inner BroadcastReceiver class. I have to show an AlertDialog based on some logic but while trying to do it, I'm getting this runtime error: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. Here's MyBroadcastReceiver class: public class MyBroadcastReceiver extends BroadcastReceiver { public MyBroadcastReceiver(){ super(); } @Override public void onReceive(final

Android - IllegalStateException: Could not execute method of the activity, Caused by InvocationTargetException

倖福魔咒の 提交于 2019-12-08 08:17:41
问题 I'm taking a Coursera Android course and am trying to complete an app that I started. I'm trying to get an animation to occur at set intervals. See here for more details I looked at a lot of posts with the same title, but everyone seems to have different solutions. I don't get an errors in Eclipse when it saves and compiles. Here's my Logcat results: 02-09 22:56:10.811: E/AndroidRuntime(29538): FATAL EXCEPTION: main 02-09 22:56:10.811: E/AndroidRuntime(29538): Process: stacy.example

android:onClick=“” causes IllegalStateException

折月煮酒 提交于 2019-12-08 08:10:39
问题 I am using onClick method of .xml view to catch the click events on my .java class. Usually runs fine. But when my Activity is running on background for a long time, later come to main thread and somebody clicks the view it returns the following exception: java.lang.NullPointerException java.lang.IllegalStateException: Could not execute method of the activity at android.view.View$1.onClick(View.java:3608) at android.view.View.performClick(View.java:4101) at android.view.View$PerformClick.run

java.lang.IllegalStateExeception: could not find method in activity class

不羁岁月 提交于 2019-12-08 06:33:54
问题 I'm not sure why but I'm getting this exception: java.lang.IllegalStateException: Could not find a method onButtonClick(View) in the activity class android.view.ContextThemeWrapper for onClick handler on view class android.widget.Button with id 'button19' in my app and I don't know how to fix it. For some reason it only throws this exception in the tablet layout. Any suggestions? Here is the layout.xml <RelativeLayout android:layout_height="fill_parent" android:layout_width="fill_parent"

java.lang.IllegalStateException: The driver executable does not exist chrome driver

人走茶凉 提交于 2019-12-08 05:00:59
问题 I would like to open url in chrome driver by applying object repository concept. Below given is my selenium programme which contain two file one is testng file and another one is config.property file chromedriver="E:\\selenium bwosers\\chromedriver.exe" url="https://www.google.co.in" I saved above programme as config.property in configuration folder package sele_prac_pkg; import java.io.File; import java.io.FileInputStream; import java.util.Properties; import org.openqa.selenium.WebDriver;

startForegroundService() is throwing IllegalStateException in Oreo on app BOOT_COMPLETED

对着背影说爱祢 提交于 2019-12-08 03:59:59
问题 The application I am having (in Android O) will start a service after device reboot. Once the device is rebooted, in the onReceive() method of the broadcast receiver it is calling the service as startForegroundService() for Android OS 8 and above. if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { context.startForegroundService(intent); } else { context.startService(intent); } Inside the service class it is starting the notification from the onStartCommand() method. But still it is throwing

How should I try to fix java.lang.IllegalStateException in JBoss “is already registered”?

陌路散爱 提交于 2019-12-07 18:50:12
问题 I have a web application. When I try to deploy it via Netbeans, the JBoss server throws the following error: DEPLOYMENTS IN ERROR: Deployment "vfs:///path/to/my/Application.ear" is in error due to the following reason(s): java.lang.IllegalStateException: Container jboss.j2ee:ear=Application.ear,jar=Application-ejb.jar,name=Another,service=EJB3,VMID=583c10bfdbd326ba:71d035f1:132a4c6a8ba:-7ffd + is already registered at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete

illegal state exception when trying to change a marker on a Google Maps v2 Api from a Google Cloud Messaging message

三世轮回 提交于 2019-12-07 02:37:20
问题 I am writing an android app and I have markers on a Google Map that should be changed to a position that I receive by GCM. I have a global static List in which I save the marker together with an id and the position. I can change the positions of the Objects in the list in my GCMBaseIntentService when I receive a message, but when I want to execute the following code: mMarker.setPosition(new LatLng(member.getLatitude(),member.getLongitude())); I get the following Exception: 01-13 18:52:38.118: