Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!

mohana krishna

Greenhorn
+ Follow
since Apr 12, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mohana krishna

I am trying to convert XML String to Java object using JaxB Unmarshall.
But when I print the values I am getting the null values.
I have tried values options like using annotation @XmlElement at field , getter and setter level.
Added @XmlAccessorType(XmlAccessType.FIELD).
Added constructor.

But nothing works.

This is my XML String I am trying to convert to Java object.



My Response java object is


My Unmarshalling code is


After executing the Xml2Object class I am getting the following output.



Can you please help to resolve the issue why null values were printed.
3 weeks ago
Hi  Norm Radder ,
Thanks for your help, now i got the issue.
After changing the following line with correct layout file name its working fine.



Earlier i referred the wrong layout file here.
Thanks once again for your help.
5 months ago
Hi  Norm Radder ,

Thanks for your response.

Question ) : What is the filename of the xml that you posted?
Answer ) activity_number_page_three.xml .
Question)  Where is the code that decides which layout to use and loads it?
Answer) Following xml code and java code.

This file name is activity_main.xml.



When user click on "@string/ThreeByThree" button following java code will be called.


In NumberPageThree.java i have logic to populate values for all the fields and other logic.
5 months ago
I want to display random numbers in a 3 rows and 3 column  table with 8 numbers and one empty cell.
When i review in Android studio its showing correctly but when i run the application on my mobile i am getting 4 X 4 table.
Please find the attached both the screenshots.

In the same app I have another layout page with 4 rows and 4 columns table but its working as per my expectation.

I have reviewd the code several times but i could not be able to find the root cause. Please help me to find out why in mobile 4 rows and 4 columns were displayed instead of 3 rows and 3 columns.

5 months ago


Thanks fir your helping.
Wondering today it worked without any issues.
9 months ago

When i try to test my app on moto g 6 i am getting the following exception

E/AppInfoDashboard: Exception when retrieving package:com.any.search.training
   android.content.pm.PackageManager$NameNotFoundException: com.any.search.training

Please find the attached screen shot , i am wondering although package name is correct i am getting the error.

Please advise.
9 months ago
Hi  Tim Moores ,

Thanks for your help.
Changed applicationId to  "com.any.search.training"  from "com.any.search.android.training"".
Then this issue is resolved.

Regards,
Mohan
9 months ago

I recently upgraded to 3.6.1.
I opened project which is developed in older version.
I migrated to AndroidX (Refractor--->migrate to Androidx).
When i try to test in my motog 6 mobile by connecting through USB i am getting the following error.

------------------------------------------------------------------------------
$ adb shell am start -n "com.any.search.android.training/com.any.search.training.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while executing: am start -n "com.any.search.android.training/com.any.search.training.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.any.search.android.training/com.any.search.training.MainActivity }
Error type 3
Error: Activity class {com.any.search.android.training/com.any.search.training.MainActivity} does not exist.

Error while Launching activity
------------------------------------------------------------------------------

I have tried option File-->Invalidate cache, Build--> Clean Project , Build-->Rebuild Project and deleted directory .gradle and .idle.
Uninstalled old app from mobile.
Restart the Android studio but it did not work.


contents of local.propoerties.
ndk.dir=C\:\\Users\\Hp\\AppData\\Local\\Android\\sdk\\ndk-bundle
sdk.dir=C\:\\Users\\Hp\\AppData\\Local\\Android\\Sdk

When i try to run in debug mode iam getting the same error.
9 months ago

Thanks Tim Holloway, i will check.
1 year ago
I am using maven , eclipse and jBoss in my project.

Now i am creating ear file using eclipse and maven.
Then I manually copy the ear file to server folder then i will start the server from Eclipse.

Now i want to automate the process as one step activity like a batch file.

If maven build is success then only ear file has to be copied to the server folder on my local machine and start my local server.

If maven build is failed then process has to be stopped

I used batch file to copy the ear file to the server folder.

Can you please help to give some hints about which process or technologies i can use to achieve my goal.

Regards,
Mohan.

1 year ago
Hi Tim Holloway,

Thanks for your reply.
I tried setting visibility to buttons and layouts but still the same issue.
Please find the below updated code.

1 year ago

My requirement is creating buttons dynamically.

I want to create buttons dynamically like

Button1  Button2   Button3   Button4

Button5  Button6   Button7   Button8

Button9  Button10  Button11 Button12

Button13 Button14 Button15 Button16


But only first line is displayed.

Button1  Button2  Button3  Button4

remaining buttons are not visible on screen.
Please check the attached screen shot.

My approach is :

Create a parent lay out using XML.

Create a child layout dynamically.
Create four buttons dynamically and add to child layout.
Add child layout to parent layout.

Please find the below code and please help to check what is the exact issue.





1 year ago

Thanks for your reply Tim Moores.

Now i understood the issue.

I want to check the possibility to import "https://www.w3schools.com/w3css/4/w3.css" in styles.xml file.

Now i understood it's not possible.



1 year ago

I am beginner in android development.
For user interface i want to use w3.css,may i know how can we refer "https://www.w3schools.com/w3css/4/w3.css" in styles.xml.
Thanks in advance.

Regards,
Mohan.
1 year ago
Hi Norm Radder,

Finally i am able to solve the issue , also i am able to read print stack trace.

I modified the code to read status of the response.



With the above code i came to know that request is not reaching the REST web service.
So i modified the URL with the service name with following code modification system is working as expected.



Thanks for your prompt replies.

Regards,
Mohan.
3 years ago