Skip to main content

         Three easy way to debug Android app for beginners 

 

hi guyz firstly i am introducing my self . My self Manoj kumar mehra I am android Developer i developed more then 20 apps . when i was started I faced many problem with debug my app so i found a easy way to debug app

 

There is a 4 way to debug android app  

    1. using emulator
    2. using blue stack 
    3. using real Device 
    4. real Device over the wifi

    using emulator

    Android Studio includes a debugger that enables you to debug apps running on the Android Emulator or a connected Android device. With the Android Studio debugger, you can:
  1. Select a device to debug your app on.
  2. Set breakpoints in your Java and C/C++ code.
  3. Examine variables and evaluate expressions at runtime.
  4. Capture screenshots and videos of your app.
To start debugging, click Debug in the toolbar. Android Studio builds an APK, signs it with a debug key, installs it on your selected device, then runs it and opens the Debug window, as shown in figure 1. If you add C and C++ code to your project, Android Studio also runs the LLDB debugger in the Debug window to debug your native code.
If no devices appear in the Select Deployment Target window after you click Debug, then you need to either connect a device or click Create New Emulator to setup the Android Emulator.

Popular posts from this blog

How to setup wifi ADB debugger for android studio

How to setup wifi ADB debugger for android studio  Firstly set your adb path Which you can find here Step 1:  Goto your  Android sdk folder -> platform tools  and copy the whole path For example:  C:\Program Files (x86)\Android\android-sdk\platform-tools Step 2:  Goto command prompt or Android studio terminal cd C:\Program Files (x86)\Android\android-sdk\platform-tools and presss enter Step 3:  Connect your device & system with same wifi. Step 4:  Type  adb tcpip 5555  and press  Enter . Step 5:  Type  adb connect x.x.x.x:5555 , replacing the  x.x.x.x  with your phone IP address. find out phone IP address Settings -> About phone -> Status  (some phones may be vary) Note: Incase if you connect more than one devices disconnect other phones except which one you need to connect

How to create google map with drag marker to get user location with auto correct location edit text ...

For drag and drop with user location You have to create a google map fragment activity below are the xml code of google map xml <? xml version ="1.0" encoding ="utf-8" ?> < androidx.constraintlayout.widget.ConstraintLayout xmlns: android ="http://schemas.android.com/apk/res/android" xmlns: app ="http://schemas.android.com/apk/res-auto" xmlns: tools ="http://schemas.android.com/tools" android :layout_width ="match_parent" android :layout_height ="match_parent" tools :context =".GetUserLocationActivity" > < fragment android :id ="@+id/mapuserloc" android :name ="com.google.android.gms.maps.SupportMapFragment" android :layout_width ="match_parent" android :layout_height ="522dp" app :layout_constraintEnd_toEndOf ="parent" app :layout_constraintStart_toStartOf ="p...

create MVVM Architecture Pattern for my android app

Here is an example of how you could implement the MVVM (Model-View-ViewModel) architecture pattern in an Android app using Java: Create a View class, for example MainActivity that extends AppCompatActivity and is responsible for handling user interactions and displaying data to the user. public class MainActivity extends AppCompatActivity { private ActivityMainBinding binding; private MainViewModel viewModel; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = DataBindingUtil.setContentView(this, R.layout.activity_main); viewModel = new ViewModelProvider(this).get(MainViewModel.class); binding.setViewModel(viewModel); binding.setLifecycleOwner(this); } } } } Create a ViewModel class, for example MainViewModel that extends AndroidViewModel and is responsible for holding and processing the data for the View , as well as handling any business logicy code public cla...