Jumat, 06 Januari 2023

Cara Ganti Package Name Project Di Android Studio

 

Method 1

Step 1: Click on the Setting Icon and Uncheck Compact Middle Packages

Step 2: Click on your Project Name and Go to Refractor > Rename 

Step 3: Click on Rename Packages

Step 4: Change the package name and click on Refractor

Step 5: Click on Do Refractor and then you will fill in finding that the project name is changed

Method 2

Open app/build.gradle and change this line:

android {

  defaultConfig {

      applicationId “com.example.yournewprojectname”

    }

}

Method 3

Update app/src/main/res/values/strings.xml:

<string name=”app_name”>New Project Name</string>

Doing this name of your app will be changed.

Method 4

Open settings.gradle and change this line:

rootProject.name = “New Project Name”

Method 5

Open app/src/main/AndroidManifest.xml and change the following line:

<manifest xmlns:android=”http://schemas.android.com/apk/res/android”

  package=”com.example.yournewprojectnamewithoutspaces”>

Senin, 02 Januari 2023

Cara Merge Conflict Source GITHUB

 Cara Merge Conflict Source GITHUB

A. Untuk diketahui terlebih dahulu bila ada conflict maka github akan memberikan template code dengan struktur berikut :

  1.  < sebagai pembuka
  2. nama branch
  3. = sebagai pembatas
  4. > sebagai penutup
  5. kode source saat commit

B. Sehingga dari template tersebut dapat di definisikan :

  • 1 dan adalah source existing/sebelumnya
  • 3 adalah pembatas
  • 4 dan 5 adalah source saat kita pull

Minggu, 01 Januari 2023

Mengatasi XAMPP: Another web server is already running

So I started terminal and type :
cd /opt/lampp/ && sudo -s
./lampp start
and then here is what happened

 


As you can see, it turns out that Apache is failed to start because Another web server is already running, said Sam (a.k.a XAMPP). How could this happen? I didn’t start any web server, though. I’ve just turned on my laptop, booted to Elementary OS 5.0 Juno (yeah, it’s Linux), and logged in. I haven’t done anything yet except opening a terminal and run XAMPP.

Solved by running this on terminal
sudo netstat -nap | grep :80

 
You’ll see apache2 and there is 3–4 digit numbers before it, mine is 980
sudo kill [number]
 

where [number] is the number for apache2 , in this case I run sudo kill 980
*The number might be different than yours.
 

Start XAMPP again.
cd /opt/lampp/ && sudo -s
./lampp start

 

Well, first we should take a look if there is a web server running when we boot the first time. Run this command on terminal:
sudo netstat -nap | grep :80

 
and see what we’ve got there.

 


There we found an Apache web server is running. This is our intruder who sabotage our web server and ruin our works. So what should we do?

You know what you have to do. Just KILL it!

We’ll get the first blood here, you ready?? 😠

We notice a number 1090 before /apache2, it’s the number we use if we want to kill the web server. Though, it might be different than yours.
Quite smart, huh? We shouldn’t let it live any longer.

Now, execute this
sudo kill [number]
*replace [number] with the number you see on terminal
In this case I run sudo kill 1090

Now could try to run XAMPP again.
./lampp start

 


Victory! Now let’s get back to work. The game has just started, Mate.

Your welcome.