Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / Tier 2 / AGKHelper ClassNotFoundException

Author
Message
KompjoeFriek
7
Years of Service
User Offline
Joined: 4th Jul 2012
Location:
Posted: 18th Jul 2012 15:57 Edited at: 23rd Jul 2012 17:02
Hi all,

I started with the template, modified it to my needs (includes a game that works with AppGameKit on windows) and got it compiling with the android NDK (so I have a libtemplate.so)
I "fixed", refreshed and cleaned the project in Eclipse as suggested by this tutorial: Tier 2 / Android Setup - Tutorial

When my App is installed (on emulator), It tries to run but fails with:
Quote: "java/lang/ClassNotFoundException;: com.thegamecreators.agk_player.AGKHelper in loader dalvik.system.PathClassLoader[.]"


Does anyone have a clue as to what I am doing wrong here?

btw, i'm using the following software om by Windows 7 64bit machine:
- AppGameKit v1076
- android-ndk-r8
- android sdk rev 20
- Java 1.6.0_33 (64bit)
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Jul 2012 19:42
The templates (Tier 2) aren't updated for 1076 for any of the platforms.

I did manage to modify the template using files from the interpreter.

I just got back from vacation and am doing some serious catching up. Otherwise I'd be able to find the thread(s) that discuss the steps to take to make a 'current' template.

I'll look into this after I finish catching up. But there is discussion in either this (android) forum or the the product chat one that talks about updating the template.

Cheers,
Ancient Lady
AGK Community Tester
victordavion
7
Years of Service
User Offline
Joined: 3rd Jan 2012
Location:
Posted: 24th Jul 2012 08:07
Please do share when you find them, because I've been searching for a while and can't quite find anything. I'm not a huge fan of this forum's search feature lol.
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 24th Jul 2012 18:05
The first one to look at is (starting with Paul's post at 14th Jun 2012 14:39): http://forum.thegamecreators.com/?m=forum_view&t=197781&b=41&p=0#m2363628

Some additional edits to the two .mk files to change interpreter to template and some other tweaks.

I need to run some errands (still catching up) and then I'll go to the android template I got to compile and post the zipped directory.

Cheers,
Ancient Lady
AGK Community Tester
victordavion
7
Years of Service
User Offline
Joined: 3rd Jan 2012
Location:
Posted: 25th Jul 2012 00:31
Alright, so firstly I appreciate you digging that up for us.

However, after following all that and double checking everything, I was able to get the project to build, but it immediately crashes on my Android 2.3.x phone and my 4.x tablet.
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Jul 2012 16:29 Edited at: 25th Jul 2012 17:10
I am not able to test the built project on my Android device right now. It will not connect anymore (an issue with the tablet).

EDIT: I was wrong about the base Android version (going from memory).

I'm not sure about the 4.x tablet. Have you been able to get Tier 1 projects to work on it?

Cheers,
Ancient Lady
AGK Community Tester
victordavion
7
Years of Service
User Offline
Joined: 3rd Jan 2012
Location:
Posted: 25th Jul 2012 19:08
That's why I'm confused lol. I can build the interpreter and it'll run and I can install an example Tier 1 project's bytecode into the interpreter and it'll run just fine, too.

So, since I'm using the code from the interpreter, I don't understand what's causing the crash in the template code.
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Jul 2012 19:45
I've uploaded the zipped jni directory from my C:\Android\IDE\templates\template_android directory.

It has everything I used to create my compilable one. Including the libAGKAndroid.a files that appear to work.

I don't know if it will run or not.

If it works, it will simply print "Hello World!".

Cheers,
Ancient Lady
AGK Community Tester

Attachments

Login to view attachments
victordavion
7
Years of Service
User Offline
Joined: 3rd Jan 2012
Location:
Posted: 25th Jul 2012 20:34
Interesting.

I replaced my jni folder with yours and cleaned/recompiled and it still crashes, but now it's a silent crash ( loads up to black screen and exits with no report ). Both devices.

I used both NDK version 6 and 8 with the same results for both. I wish I understood this stuff better.
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Jul 2012 22:03
Are you sure that all the AppGameKit bits in your android directory are all the same AppGameKit version?

I am using android-ndk-r7. The one the AppGameKit guides use is r6.

I wonder if the problem is in android-ndk-r8?

Cheers,
Ancient Lady
AGK Community Tester
victordavion
7
Years of Service
User Offline
Joined: 3rd Jan 2012
Location:
Posted: 25th Jul 2012 22:56
Yes. I uninstalled and deleted everything. Installed 1076. Deleted my old IDE copy ( I never modify the original after each installation ) and made a new copy of the IDE folder. Copied in your jni folder and compiled with r7, r6, and r8. All have the same problem on both devices. It loads up to a black screen then exits.

Is there some kind of log file AppGameKit might be generating that I can check that you know of?
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Jul 2012 23:02
The only log file would be one that you create.

There is an app for Android (aLogCat) that lets you look at the system log, but I've never been able to find any AppGameKit errors listed there. And so many things get dumped to the log that it is hard to see where your own app did anything.

I'm currently shopping for an inexpensive Android device to test on (since my current one just won't work with Eclipse anymore). Once I have one, I can see if my template build works.

Cheers,
Ancient Lady
AGK Community Tester
bjadams
AGK Backer
11
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 2nd Aug 2012 16:03
i managed to make my app run a couple of times in 1076, but unfortunately now I get the same error:

"java/lang/ClassNotFoundException;: com.thegamecreators.agk_player.AGKHelper in loader dalvik.system.PathClassLoader[.]"

Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Aug 2012 22:20
That is actually a good clue!

There should be no attempt to use the player helper stuff, I think.

Cheers,
Ancient Lady
AGK Community Tester
Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Aug 2012 22:58
The helper classes are all in the "src" folder, this should be copied from the interpreter project into your template.

We've had some problems when trying NDK 8b with the NDK source so if you are having issues there I recommend using 6b as I can confirm that works. At some point we may get around to upgrading the NDK version. You can download the old NDK 6b here
bjadams
AGK Backer
11
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 2nd Aug 2012 23:33
I am using NDK r7, the one that was available for download when AppGameKit Android came out.

I have a working prototype of an app made in AppGameKit, and I have a presentation on Sunday! I badly need to compile it to Android too. It was working, then after a couple of compiles it stopped!!!!!!!! I'm really JINXED big time!!!
KompjoeFriek
7
Years of Service
User Offline
Joined: 4th Jul 2012
Location:
Posted: 6th Aug 2012 16:07
Quote: "The helper classes are all in the "src" folder, this should be copied from the interpreter project into your template."

This seems to work for me, thanks!
Ancient Lady
Valued Member
15
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Aug 2012 19:26
Also, Paul had a working Android template added to the TGC 'Your Products' download page.

Several of us have used it and it works just great! Compiles and runs!

Cheers,
Ancient Lady
AGK Community Tester

Login to post a reply

Server time is: 2019-09-16 17:03:19
Your offset time is: 2019-09-16 17:03:19