applications – My app (LightHead app) Crashes on Startup by installing by adb through Android studio on my Phone

Error :


 
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.lightheadapp, PID: 25872
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.lightheadapp/com.example.lightheadapp.MainActivity}: java.lang.ClassCastException: androidx.constraintlayout.widget.ConstraintLayout cannot be cast to android.widget.RelativeLayout
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2525)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2617)
        at android.app.ActivityThread.access$800(ActivityThread.java:182)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474)
        at android.os.Handler.dispatchMessage(Handler.java:111)
        at android.os.Looper.loop(Looper.java:218)
        at android.app.ActivityThread.main(ActivityThread.java:5657)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:990)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:785)
     Caused by: java.lang.ClassCastException: androidx.constraintlayout.widget.ConstraintLayout cannot be cast to android.widget.RelativeLayout
        at com.example.lightheadapp.MainActivity.onCreate(MainActivity.java:22)
        at android.app.Activity.performCreate(Activity.java:6135)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2472)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2617)�
        at android.app.ActivityThread.access$800(ActivityThread.java:182)�
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474)�
        at android.os.Handler.dispatchMessage(Handler.java:111)�
        at android.os.Looper.loop(Looper.java:218)�
        at android.app.ActivityThread.main(ActivityThread.java:5657)�
        at java.lang.reflect.Method.invoke(Native Method)�
        at java.lang.reflect.Method.invoke(Method.java:372)�
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:990)�
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:785)�

Source code :


    public class MainActivity extends 
    AppCompatActivity {
     Button button;
     @Override
     protected void onCreate(Bundle 
     savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    RelativeLayout bgElement = (RelativeLayout) 
     findViewById(R.id.activity_main);
    bgElement.setBackgroundColor(Color.WHITE);
    myButtonListenerMethod();
     }
    public void myButtonListenerMethod() {
     button = (Button)findViewById(R.id.button);
     button.setOnClickListener(new 
     View.OnClickListener() {
     @Override
     public void onClick(View v) {
     RelativeLayout bgElement = 
    (RelativeLayout)findViewById(R.id.activity_main);
     int color = ((ColorDrawable) 
     bgElement.getBackground()).getColor();
     if (color == Color.RED) {
     bgElement.setBackgroundColor(Color.BLUE);
     }
     else {
     bgElement.setBackgroundColor(Color.RED);
     }
     }
     });
     }
    }

systemd – How to run minikube start as a linux service on startup?

This question is related to How to arrange a non admin command as a systemd service?

I have the following minikube.service file:

(Unit)
Description=Runs minikube on startup
After=vboxautostart-service.service vboxballoonctrl-service.service vboxdrv.service vboxweb-service.service

(Service)
Type=forking
ExecStart=/usr/local/bin/minikube start
User=mark
Group=mark

(Install)
WantedBy=multi-user.target

And it works fine when I start it manually from the shell:

mark@minikube-vm:~$ sudo systemctl start minikube.service
mark@minikube-vm:~$ minikube ip
192.168.99.100
mark@minikube-vm:~$ systemctl status minikube.service
● minikube.service - Runs minikube on startup
   Loaded: loaded (/etc/systemd/system/minikube.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-09-25 17:32:48 UTC; 34min ago
  Process: 8388 ExecStart=/usr/local/bin/minikube start (code=exited, status=0/SUCCESS)
    Tasks: 46 (limit: 19141)
   CGroup: /system.slice/minikube.service
           ├─8434 /usr/lib/virtualbox/VBoxXPCOMIPCD
           ├─8439 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
           ├─8618 /usr/lib/virtualbox/VBoxHeadless --comment minikube --startvm 6ec91432-0f09-4fdc-9976-6f736b15c37f --vrde config
           ├─8632 /usr/lib/virtualbox/VBoxNetDHCP --comment HostInterfaceNetworking-vboxnet0 --config /tmp/dhcp-config-kiyf3.xml
           └─8658 /usr/bin/pulseaudio --start --log-target=syslog

Sep 25 17:31:22 minikube-vm minikube(8388): * Using the virtualbox driver based on existing profile
Sep 25 17:31:22 minikube-vm minikube(8388): * Starting control plane node minikube in cluster minikube
Sep 25 17:31:22 minikube-vm minikube(8388): * Restarting existing virtualbox VM for "minikube" ...
Sep 25 17:31:23 minikube-vm pulseaudio(8658): (pulseaudio) server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSu
Sep 25 17:31:23 minikube-vm pulseaudio(8658): (pulseaudio) main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported:
Sep 25 17:32:16 minikube-vm minikube(8388): * Preparing Kubernetes v1.19.0 on Docker 19.03.12 ...
Sep 25 17:32:43 minikube-vm minikube(8388): * Verifying Kubernetes components...
Sep 25 17:32:48 minikube-vm minikube(8388): * Enabled addons: dashboard, default-storageclass, storage-provisioner
Sep 25 17:32:48 minikube-vm minikube(8388): * Done! kubectl is now configured to use "minikube" by default
Sep 25 17:32:48 minikube-vm systemd(1): Started Runs minikube on startup.
mark@minikube-vm:~$

But on machine boot it fails:

mark@minikube-vm:~$ systemctl status minikube.service
● minikube.service - Runs minikube on startup
   Loaded: loaded (/etc/systemd/system/minikube.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Fri 2020-09-25 17:18:09 UTC; 12min ago
  Process: 7140 ExecStart=/usr/local/bin/minikube start (code=killed, signal=TERM)

Sep 25 17:16:39 minikube-vm minikube(7140): * Using the virtualbox driver based on existing profile
Sep 25 17:16:39 minikube-vm minikube(7140): * Starting control plane node minikube in cluster minikube
Sep 25 17:16:39 minikube-vm minikube(7140): * Restarting existing virtualbox VM for "minikube" ...
Sep 25 17:16:40 minikube-vm pulseaudio(7438): (pulseaudio) server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSu
Sep 25 17:16:40 minikube-vm pulseaudio(7438): (pulseaudio) main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported:
Sep 25 17:17:34 minikube-vm minikube(7140): * Preparing Kubernetes v1.19.0 on Docker 19.03.12 ...
Sep 25 17:18:06 minikube-vm minikube(7140): * Verifying Kubernetes components...
Sep 25 17:18:08 minikube-vm systemd(1): minikube.service: Start operation timed out. Terminating.
Sep 25 17:18:09 minikube-vm systemd(1): minikube.service: Failed with result 'timeout'.
Sep 25 17:18:09 minikube-vm systemd(1): Failed to start Runs minikube on startup.
mark@minikube-vm:~$

What am I missing?

macos – why does holding ‘d’ on startup initiate internet recovery rather than hardware test?

Just because you hold d doesn’t mean the signal is correct. Also, I wouldn’t put any effort into running home diagnostics. That only tests for things like “One of the four tires on your car is missing.”

My move for this symptom is to call Apple or chat with them online. Ask for them to send you a link to test your battery remotely while the OS is running. That will tell you far more. Also, if you can’t get the os running or erase, reinstall it from recovery, then you have larger issues than even getting diagnostics to run.

They will either fix your issue or offer a flat rate repair so you know how much worst case a repair will be.

In the end, you’re in the correct screen you need to decide how to move forward despite your wanting a quick diagnostic. You need to get to system information and have the battery specific diagnostics run by Apple at this point.

Get Funds For Your Startup – Other Money Making Opportunities

Every startup requires seed funding to get their business off the ground. There are a couple of options that every startup owner should keep in mind when looking to get funds for your startup

Bootstrapping – Generally startup owner’s start with bootstrapping which in layman’s terms means self funding by pooling into their own savings and funds.

Friends and family – get help from your friends and family and convince them in your idea and startup to invest which will involve much less formal protocols.

There are other sources of acquiring funding for your startup – 

  • Crowdfunding

  • Angel investors

  • Venture capitalists

  • Banks

  • Government schemes 

How can i modify the boot.img files so that when the power button and volume + is pressed during startup it doesnt start recovery but fastboot instead

Stack Exchange Network


Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

building a marketplace startup – Other Money Making Opportunities

Marketplace is an online platform designed to bring sellers and buys on the same place ro conduct commerce. Apart from the efforts that go into designing and developing the platforms while keeping in mind user experience and engagement, business structure and marketing scheme are the most priotised aspects of building a marketplace startup.

 

A clear and crisp business structure connecting the network of merchants to the platform and further into marketing them for customers with unbiased nature and transparency is the key to a successful marketplace.

Funding for New Startup Companies – Other Money Making Opportunities

Starting a business of your own is already such an adventurous journey to embark on, but it is more than just ideation and execution. As soon as an entrepreneur has an established idea to start developing, the first popping question is where to get funding. In traditional manner it does seem quite a hectic job but now there are various platforms to get funding for new startup companies. Multiple funding platforms like startup paisa exist in the market to facilitate a platform for entrepreneurs and new business ventures to get a direct link with investors. Apart from bootstrapping aka self funding, there are many investors like angel investors, adventure capitalists and even various multiple government campaigns interested in new ventures with a potential to flourish in the future. Such platforms also provide screening for business plans and improvement for the same. So if an idea has potential, it is sure to catch attention, especially with the help of such platforms.

New startup project | Proxies-free

I’m starting a new startup project and anyone who wants to try it, pm me.

What you get by joining?
Anyone who is accepted into the project will get a script. This script provides access to the project and the user can use it for as long the user wants. Any user which is enroled in this stage will receive free updates (Until the project escalate).

What you need to do?
Send me a pm and i will contact you.

macos – A software update is required to use this startup disk – does not update

I’m trying to do a clean install of macOS via USB on my MacBook Pro 2019 13″.
I have setup the boot security so that:

  1. It has medium security (I also tried no security) on bootable devices
  2. Allows the Mac to boot from an external drive.

I formatted my USB to Mac OS Extended (Journaled) with GDUI partition map. The USB with the macOS installer successfully shows on the startup manager. When I try and boot from it, however, I get this message:

enter image description here

I click update and I then get this error after seeing an Apple Logo (yes I was connected to internet):

enter image description here

So in conclusion I cannot boot from this USB.

The USB is of type USB-A that’s connected through a USB-C hub, that could be the problem? Maybe a direct connection from a USB-C usb flash drive is better?
Or the wrong formatting on the USB drive.

That’s the only two I suspect. But then again, why isn’t it updating?

Thanks.

macos – Vim frozen and unresponsive on startup

This question was originally asked here. Please see the comments and edits to see the attempted fixes so far.


I am using zsh on macOS. When I type vim, it opens, but it is completely frozen:

Anything I press on the keyboard does not display or change the window. In order to exit, I have to terminate the terminal session.

I did recently uninstall Homebrew, so it could be that this corrupted the program.

Does anyone know how this can be fixed? Is there a way to reinstall or update the system Vim (preferably, without Homebrew – it causes more problems than it solves).