Android Learning

How to Change Package Name In Android Latest Version? -NSC

Hi friends Welcome To Nulled Source Code Today, We will Learn How to Change Package Name In Android Studio. So let’s started… Open Your Android Studio and Select Project which we created in our Last Video. FristApp ok The Process is very simple just focus on Video not my spellings.

If you any questions or doubts feel free to comment below. You will get All Source Code Free Here.

First of All, Go to the gear or setting icon beside our app folder as shown in video or screenshot. Then uncheck Compact Middle Packages.

Now go to app > Java > COM Right click on com and select Refactor than click on Rename than press Rename All.

Now you see we change our package fist part com to org. Now in the same way right click on NULLEDSOURCECODE. Than Choose refactor > rename > than enter your desired package name and click on rename package done. Than click in bottom Do Refactor when it prompt. In the same way go to firstapp folder right click on it and choose refactor > rename > than click on refactor and done. when prompt click on Do Refactor.

Now go to Manifest.xml file and put your full Package name here.

Now go to build.gradle (app level) and write your package Name here also.

Then click on sync in the Top Right corner.
Now we successfully change the package Name of our App.

How to Add Firebase AdMob Banner Ads Into Android Studio.

Now we will learn How To Add Firebase into Our Project.

Before this run the app that our package name is working fine or not. Connect USB to Your Mobile if you want to run App on Android Mobile. We got an error because we not add the package name in Our MainActivity.java so add it with your new Package name. Now our app is working fully.

Now Add Firebase to our app. First of all, Go to Tools Menu > Firebase than on the right side select what service you want to add. Now click on AdMob so that using this you can also learn how to add Ads to your app. Now click on Connect to Firebase. First of All, go to Top right corner and add your Firebase account Create a New Project if want else you can add an existing Project to it. I have already created many Projects manually. from https://console.firebase.google.com/ So Select your project from the list and proceed to ahead Now our Project is successfully connected to our Firebase.

Now click on Add AdMob to your App. It will add some dependency to your project so click on Accept Changes. Note:- While our project in processing or syncing doesn’t change anything.

Now copy the code from the right-side panel and put it in your layout file > activity_main.xml Now go to App > res > layout > activity_main.xml Now copy the test Ad Unit Id into App > res > values > strings.xml Now go to MainActivity.java file and add the AdView Code App > java > MainActivity.Java Press alt+enter on red words if it does not work then add import the file manually like this… Now all the errors are gone.

Now run the app to test the Ads are working or Not. We got an error that google-services.joson is missing To solve this go to https://console.firebase.google.com

Select your project Now download google-services. JSON Now goes to Android Studio and click on build.gradle app-level file than click ctrl + left mouse click Now it will open up your projects root directory directly now drag the JSON file to it from chrome. and Rename it exactly: google-services.json Now run the app again. Wait till it finishes the processing Our app crash again because we not added app id in our Manifest.xml file. I’m here showing errors because you will be able to solve them after watching this video. Just click on the link which is given in the error. If the link did not work then you will go to the Internet And search Admob app id for Manifest.

Then copy id the id and go to App> Manifest > Manifest.xml paste this code just above the closing tag. Now run the app…. An app running file but banner ads not working for this you have to insert it in linear layout or change the layout to Relative layout is good for All Remove all the constraints, Now run the application Ads will show when you initialized it in MainActivity.java Maybe some problem in latest version SDK Internet must be turned on to see ads Now-ads is working fine…

2 Comments

Leave a Comment

Ads Blocker Image Powered by Code Help Pro
Ads Blocker Detected!!!

We are not sons of Bill Gates.

The revenue we earn from the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.

Please Co-operate with us.

 
Refresh