Mintoris Forum

Author Topic: App creation problems  (Read 5021 times)

sixtron

  • Full Member
  • ***
  • Posts: 32
App creation problems
« on: Mar 25, 2015, 08:27 PM »
This procedures from the videos needs to be updateted, because there is newer software working and looking different.

sixtron

  • Full Member
  • ***
  • Posts: 32
App creation problems
« Reply #1 on: Mar 26, 2015, 09:24 PM »
Got some errors. What is wrong ?

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: App creation problems
« Reply #2 on: Mar 27, 2015, 04:33 PM »
Well the good news is that it looks like you are very close to getting your app working.

It's hard to tell what the problem is from your screenshot. But, it looks like you are missing the imports at the top of AutoRun.java. (See screenshot).

If this does not fix your problems, expand and open the res->values->strings.xml file and take a screenshot.

-Chuck
« Last Edit: Mar 27, 2015, 04:35 PM by Chuck »

sixtron

  • Full Member
  • ***
  • Posts: 32
Re: App creation problems
« Reply #3 on: Mar 28, 2015, 02:21 AM »
There is a error message for the "package" command in the Autorun.java saying:

The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
Configure Build path…

Multiple markers at this line
   - The type java.lang.Object cannot be resolved. It is indirectly referenced from
    required .class files

So it don´t has the Build Path from what ? How can i configure the path ? Looks like is missing class files.

« Last Edit: Mar 28, 2015, 03:06 AM by sixtron »

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: App creation problems
« Reply #4 on: Mar 28, 2015, 03:43 AM »
Compare your settings with the screenshots below.

The problem with the strings.xml has been resolved. You no longer have an error in your manifest. Once you get this working right the first time, it will be easy.

-Chuck

sixtron

  • Full Member
  • ***
  • Posts: 32
Re: App creation problems
« Reply #5 on: Mar 28, 2015, 04:49 AM »
Looks better now but i have Android 2.2 selected because i dont have 2.1 and
i have also Android 8 SDK instead of 7.
Now i have a "R." problem.

Btw. i can not post here because my last post was less then 300 Seconds ago. Have to wait 6 minutes.
Can you change this please or is it wanted ?
Also after this time, the forum software told me i have already posted this message. Strange thing.
« Last Edit: Mar 28, 2015, 04:52 AM by sixtron »

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: App creation problems
« Reply #6 on: Mar 28, 2015, 04:59 AM »
Try going to project->clean and clean your project

The post delay is to help prevent spam attacks. They happen sometimes.

sixtron

  • Full Member
  • ***
  • Posts: 32
Re: App creation problems
« Reply #7 on: Mar 28, 2015, 05:08 AM »
Found the mistake i wrote in res/values/strings.xml instead of:
<string name="app_name">countdown</string>

i wrote wrong:
<string name="countdown">Runtime Demo</string>

6:00 am here right now ;)

Now i have one yellow and some white marks remaining
« Last Edit: Mar 28, 2015, 06:24 AM by sixtron »

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: App creation problems
« Reply #8 on: Mar 28, 2015, 05:19 AM »
Make the change highlighted in the screenshot below to get rid of that warning.

I set the post delay to 1 min.


Or you could just move that input.close() up before the if.
« Last Edit: Mar 28, 2015, 05:26 AM by Chuck »

sixtron

  • Full Member
  • ***
  • Posts: 32
Re: App creation problems
« Reply #9 on: Mar 28, 2015, 05:28 AM »
This fix it.
What about the message below from console ?

[2015-03-28 05:30:53 - countdown] C:\Users\PC\workspace\countdown\AndroidManifest.xml:41: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name').
[2015-03-28 05:30:53 - countdown]
[2015-03-28 05:30:53 - countdown] C:\Users\PC\workspace\countdown\AndroidManifest.xml:45: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name').
[2015-03-28 05:30:53 - countdown]

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: App creation problems
« Reply #10 on: Mar 28, 2015, 05:33 AM »
@string/app_name refers to <string name="app_name">countdown</string> in your strings.xml file. If you fixed that as you said, it should be fixed. Is that just an old message on the console screen? try right click on console screen and clear the window. Also try right click on project and refresh.

sixtron

  • Full Member
  • ***
  • Posts: 32
Re: App creation problems
« Reply #11 on: Mar 28, 2015, 05:42 AM »
Yes it´s gone. Looks like i can start the emulator after many hours of installing and fixing.
Thank you.

One thing i really dont like, when i understand right, the user of my app has to download the basic runtime app
by himself to let the basic program work.
Is there the possibility to include this by myself so that the user dont see anything about the runtime app ?

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: App creation problems
« Reply #12 on: Mar 28, 2015, 06:03 AM »
One bonus to all this is that you are now all set up to write apps in native java.

sixtron

  • Full Member
  • ***
  • Posts: 32
Re: App creation problems
« Reply #13 on: Mar 28, 2015, 06:14 AM »
This was not the answer that i liked to hear ;) Make a tutorial please how we can do this.

Have another problem. I send the icode from my countdown program to my pc and rename it to program.icode and
copy it over and what comes up ?


sixtron

  • Full Member
  • ***
  • Posts: 32
Re: App creation problems
« Reply #14 on: Mar 28, 2015, 07:20 AM »
I tried to replace the program.icode from the Runtimedemo folder from workspace with
my program.icode. After that don´t helped i tried to remove the Runtimedemo folder
from workspace so that only my app remains and in both ways i got this.

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: App creation problems
« Reply #15 on: Mar 28, 2015, 06:22 PM »
I've updated the Basic runtime download with the newest version.

Basic Runtime Download

sixtron

  • Full Member
  • ***
  • Posts: 32
Re: App creation problems
« Reply #16 on: Mar 29, 2015, 06:40 AM »
Is working so far, thanks. Now i will do your tuturial part two.

Ok was a one minute job because eclipse offers an easy way to create a signed apk under
Android tools, export signed apk, create new keystore. 

The question i have is:

1.) How do i include my soundfiles to my apk ?
2.) What happens with the installation dir ? Where is it ? Maybe you can explain a little bit for what i have to take care of ?

The user should install the program and if he choose as example an alarm sound from my soundfiles he should
be in the right audio dir first.
 
  
« Last Edit: Mar 29, 2015, 07:01 AM by sixtron »

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: App creation problems
« Reply #17 on: Mar 29, 2015, 06:02 PM »
- Zip your data dir. Your dir must be in the root of the data directory Mintoris.Basic/Data. Name the zip file data.zip

- Use something similar to this to zip your data dir. Fill in all your sound files.
Code: [Select]
files$() = "Didah.wav", "Dingdangdong.wav", etc
print "Zipping…"
wait 1
Zip "data.zip", files$()
print "Done"


- Put the data.zip file in your res/raw directory. Afterwards don't forget to right click on your project and refresh.

- In AutoRun.java change the following lines
Code: [Select]
  // Set the following constant to null if you do not use external storage.
   private static final String BASE_DIR_NAME = "MyRootDir";

   // Set the zip file name to null if you don't have data to pre-load.
   private static final String DATA_ZIP_NAME = "data.zip";

- Uncomment the following lines in preloadData(Bundle bundle)
Code: [Select]
// Uncomment the next three lines if you need to install data files.        
//         String sDataZip = sDataDir + "/" + DATA_ZIP_NAME;
//         if(‼copyToSDCard(R.raw.data, sDataZip))
//            return false;

That should create a new dir in the root of the sdcard called MyRootDir (Pick your own dir name). MyRootDir will then act as the root Data dir instead of Mintoris.Basic/Data. Under that dir your data.zip will automatically be unziped before the first run of your program.

Let me know how that goes.

-Chuck

P.S. Using mp3 files would save a ton of memory.
« Last Edit: Mar 29, 2015, 06:08 PM by Chuck »

sixtron

  • Full Member
  • ***
  • Posts: 32
Re: App creation problems
« Reply #18 on: Mar 30, 2015, 02:56 AM »
yes, all went fine. I change only the zip program to:

rootdir on
chdir""
chdir "mintoris.basic/data/"
zip "data.zip","audio"
popup "Done"

To zip the complete Audio folder.

After installing there don't appears an icon on the main screen, is it normal when you install an apk from another place as playstore or is something missing ?

Where is the program code installed in my phone ? Can't find it.

Ok, no tell me please how can i include basicruntime and my day is saved.
« Last Edit: Mar 30, 2015, 04:07 PM by sixtron »

sixtron

  • Full Member
  • ***
  • Posts: 32
Re: App creation problems
« Reply #19 on: Mar 31, 2015, 07:15 PM »
I saw when uninstalling the root folder remains there inclusive all files ?