2016년 11월 17일 목요일

Please help! Cannot compile App to .apk! :-(


Dear friends,

I finished developping my app, on which I worked for the past 3 months, but now I cannot compile it. This is the error I get:

App Inventor is unable to compile this project. 
The compiler error output was 
________Preparing application icon
________Creating animation xml
________Determining BR names and actions
________Generating manifest file
________Attaching native libraries
________Attaching component assets
________Compiling source files
(compiling appinventor/ai_armai123mai/Test1_copy_4_copy/Screen1.yail to appinventor.ai_armai123mai.Test1_copy_4_copy.Screen1)
(compiling /tmp/runtime1791431272433290597.scm to com.google.youngandroid.runtime)
Kawa compile time: 2.197 seconds
________Invoking DX
YAIL compiler - DX execution failed.

Unfortunately, I have no clue how to deal with these error outputs. I never set up an application icon etc.

This .aia file is just a bit larger than 1 MB.
I have no warnings or errors shown in the blocks editor.
and I only use 1 screen.

The app works perfectly on my companion by the way.

Can anybody please log into my project and have a brief look at the app? and maybe try to compile it?

This app is very important to me as I made it for my final thesis at my university, which I have to hand out before friday... :( 

So... I would be really grateful if you could help me...

Thank you a lot.
By the way, these are the source codes for the extensions I use in my app (No idea if this matters though).

Exporting the project as .aia is possible, but there is no way to make the app persistent on a phone...


Here comes the .aia file. Can anybody try to compile it for me, please?

attached file: Test1_copy_4_copy.aia


after removing your extensions your project builds fine...
well, there is not much left then...
to test each extension itself probably would have been a good idea before putting everything together without any test...

it seems to be, you are not very familiar with App Inventor programming itself...


2) to use an endless loop (while true) is not a good idea...

3) avoid redundancy

probably it helps to read chapter 19 - 21 in Dave's book http://www.appinventor.org/book2 to get an idea how to do DRY programming with App Inventor https://en.wikipedia.org/wiki/Don%27t_repeat_yourself

btw. there is already a Client TCP extension available...
Client TCP Extension by Jean-Rodolphe Letertre

probably you like to try that?
good luck with your thesis!

Taifun


Hey,
thank you for your response!






Thank you for this really nice feature!! :-)




Well, how do you recommend to realize endless loops then?
By the way, I think I understood the way events are handled, which is why I decided to work with threads.


3) avoid redundancy

probably it helps to read chapter 19 - 21 in Dave's book http://www.appinventor.org/book2 to get an idea how to do DRY programming with App Inventor https://en.wikipedia.org/wiki/Don%27t_repeat_yourself



Thanks. I know about the dry principle in general and go for it as much as I can, but in my app, I honestly don't think there is much more improve.


btw. there is already a Client TCP extension available...
Client TCP Extension by Jean-Rodolphe Letertre



I had a brief look at this a few days ago, but I wasn't sure if it would meet my demands and since it was part of my job for my thesis to make an extension by my self, I didn't use it.

after removing your extensions your project builds fine...
well, there is not much left then...
to test each extension itself probably would have been a good idea before putting everything together without any test...



Too bad I didn't know this. I just didn't expect the compiling process to become a problem as the app was working fine on my phone using the Companion. I tought, there was some compiling process already going on that way and didn't think that compiling the .apk is something with a big difference.

Well, I'm not sure if there is much more time left for debugging and redevelopping. Do you have any idea how I could achieve a quick solution, some kind of a work-around maybe to get the app on my professors mobile?



Well, how do you recommend to realize endless loops then?

use the clock component ,The 'Do something' example



 I honestly don't think there is much more improve.

that's correct, there is not much, except of



 how I could achieve a quick solution, some kind of a work-around maybe to get the app on my professors mobile?

probably someone from MIT can help?
concerning DX execution failed see this recommendation from Evan

Looking at the contents of your AIX files, it appears you are placing all of your extensions in the same package, which makes the ant extensions script include all of them in any AIX you build. The current best practice is to have a package per extension that contains all classes required for the extension so you may want to split up your classes accordingly. You could also strip out the unneeded classes in files/AndroidRuntime.jar on a per-extension basis to ensure backwards compatibility by not changing the package name. However, it's probably best to perform the refactoring now to save future headaches.

alternatively build each extension separately



Thanks! I replied to this issue in the other section.

How could I improve/shorten those two 2 procedures?



How could I improve/shorten those two 2 procedures?

use only 1 procedure and pass the value true or false as parameter



Good idea, thx

댓글 없음:

댓글 쓰기