runtimeexception

realize “back arrow” with help basefragment

拟墨画扇 提交于 2019-12-13 06:39:42
问题 I have BaseFragment public abstract class BaseFragment extends Fragment { private static String TAG = "BaseFragment"; private BaseFragmentActions baseFragmentActions; @Override public void onAttach(Context context) { super.onAttach(context); Log.i(TAG, "onAttach = "); try { baseFragmentActions = (BaseFragmentActions)(StartPageActivity)getActivity(); } catch (ClassCastException e) { throw new ClassCastException(((StartPageActivity)getActivity()).toString() + " must implement interface

Helper Class - Error Unable to start activity ComponentInfo:

岁酱吖の 提交于 2019-12-13 01:26:46
问题 Error Unable to start activity ComponentInfo: java.lang.IllegalStateException: System services not available to Activities before onCreate() I´m experimenting with seperating the code and the use of a helper class. (Created different Java files) What I did is created an Activity Java file that is registred in the Manifest and I didn´t register this following class (Java file): import android.app.Activity; import android.location.LocationManager; import android.net.ConnectivityManager; ....

Strange NullPointerException

a 夏天 提交于 2019-12-12 22:14:47
问题 I have strange problem... My file strings.xml contains: <?xml version="1.0" encoding="utf-8?> <resources> <string name="building_name">My House</string> </resources> Well, my R contains: [...] public static final class String { public static final int building_name=0x7f02383; } [...] So, when I try to call this String in my code like this: private final String BUILDING_NAME = getString(R.string.building_name); I have this error: java.lang.RuntimeException: Unable to instanciate activity

Getting 'java.lang.ClassCastException' while trying to set subtitle of a CollapsingToolbarLayout

喜夏-厌秋 提交于 2019-12-12 04:23:30
问题 I'm trying to set 'Sub-title' of a CollapsingToolbarLayout in my app using this example here. Here's the code from onCreate() of Profile.java : CollapsingToolbarLayout collapsingToolbarLayout; Toolbar toolbar; HeaderView toolbarHeaderView; HeaderView floatHeaderView; collapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapse_toolbar); // error on the line below toolbarHeaderView = (HeaderView) findViewById(R.id.toolbar_header_view); floatHeaderView = (HeaderView)

Transfer data between EditText and Text View

不想你离开。 提交于 2019-12-12 03:56:52
问题 I'm trying to make an activity that take the value of the EditText and put it in the TextView in another activity. This is the code for the first activity which contains a Textview and option menu to edit it public class Saturday extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.saturday); Intent i = getIntent(); String txt = i.getExtras().getString("txtData",""); final TextView Tclass1; Tclass1 =

Composer install: error on temporary file

柔情痞子 提交于 2019-12-12 02:37:38
问题 I have a problem with windows 10 and composer (last version). When I want to execute command "composer install" in my project, a symphony error is thrown: [Symfony\Component\Process\Exception\RuntimeException] A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable My TEMP variable is "%USERPROFILE%\AppData\Local\Temp". The folder exists and permissions are good. Can anyone help me to find the problem please? Thank you. 回答1:

how fix this exception on android : Fail to connect to camera service

点点圈 提交于 2019-12-12 01:43:19
问题 I have bellow code for capturing video. At the first time this code works well but when I back from activity and choose capture video( I have a list at main which one of it choices is capture video) ,then gives me this error: java.lang.RuntimeException: Fail to connect to camera service error. I dont know what line of my code makes this error. How I fix this problem? protected void startRecording() throws IOException { mCamera.stopPreview(); mCamera.unlock(); mrec = new MediaRecorder(); //

PowerShell - If Then: cannot call a method on a null-valued expression

痴心易碎 提交于 2019-12-11 17:28:34
问题 When I run the program this function is in I get a cryptic error that doesn't make sense to me. I wasn't aware I was running a method on a null-valued expression. It occures to me that this is either a scope issue or a value is not getting set. I however have not been able to figure it out and put it out to the community: You cannot call a method on a null-valued expression. At C:\Users\Administrator\Desktop\DCB Settings Modification\DCBxPowershell.ps1:747 char:21 + If ($resetAdapter -eq

Google Play Console - Crash Report: java.lang.RuntimeException

家住魔仙堡 提交于 2019-12-11 17:13:52
问题 I received some crash reports from users of one of my apps in the Google Play Store. This is the stack that I find the play store: java.lang.RuntimeException: at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2946) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3081) at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor

Method not found: 'Serilog.LoggerConfiguration Serilog.LoggerConfigurationLogentriesExtensions.Logentries

早过忘川 提交于 2019-12-11 15:27:43
问题 I am working on a .net core project which uses a nuget package say NUGET 1. The package references serilog for logging purpose. Everything works fine till here. The references of serilog can be seen in the image. As soon as I add another nuget package say NUGET 2. The project still builds but this time I get a runtime error below. Method not found: 'Serilog.LoggerConfiguration Serilog.LoggerConfigurationLogentriesExtensions.Logentries(Serilog.Configuration.LoggerSinkConfiguration, System