Sir, I am a beginner in Java.I have many doubts in building an apk using java program.I have referred many websites including stack overflow and got few ideas in developing an android application.
What I did is:
1. Downloaded Android studio and built a signed apk(Successful build).
2. Copied the apk_release.apk to my phone and installed it(Successful installation).
3. when I opened the installed .apk it shows me "unfortunately KLUVIS(my file name) has stopped.
4. Using developers settings in my android phone I have enabled USB debugging and installed the app using adb.exe.But the same problem which I have encountered.
5. Referred various procedures in internet but didn't work.
here is my code:
import java.util.Scanner;
public class KLUVIS {
public static void main(String[] args) {
int s1, s2, s3,h;
float end;
float assign;
Scanner in = new Scanner(System.in);
System.out.println("\t\tKLU SEMESTER MARK CALCULATOR Ver.1.00.0000\n\t\tProgrammed by N.Visweswaran.,DMO.,DCP.,\n\t\tB.tech(EEE) I year, Kalasalingam University(Batch:2015-2019)\n\t\tStudent of Prof.Sivanesh Kumar");
System.out.println("\n\nFor how many subjects you want to calculate: ");
h= in.nextInt();
for (int i = 1;i <= h;i++)
{
System.out.println("\nEnter your sessional one marks: ");
s1 = in.nextInt();
System.out.println("\nEnter your sessional two marks: ");
s2 = in.nextInt();
System.out.println("\nEnter your sessional three marks: ");
s3 = in.nextInt();
System.out.println("\nEnter your assignment marks: ");
assign = in.nextFloat();
end = (float) (((s1 + s2 + s3 ) / 7.5) + (assign / 10));
System.out.println("\nYour current marks is " +end);
if (end <= 40)
{
end = (40-end)*2;
System.out.println("\nMarks needed to pass in your end semester exam: " +end);
}
else
{
System.out.println("\nHurrah! you have already passed in your examination");
end = (end - 40)/2;
System.out.println("\nAdditional marks that you have: " +end);
}
}
}
}
Have I missed anything to build an apk? Kindly help me.
I don't have that much knowledge in java so I dont know I to convert this code into apk.
Since I have an adequate knowledge in C and C++ programming I did the same using cross platform android development tool provided by visual studio and it shows the the same message.Sir,Kindly help me with this.