lorinbeer's Recent Forum Activity

  • build the project, the library will automatically build, what errors are showing up in your project?

  • Scratch that, just gonna go with eclipse. So I imported both folders, now what?

    Click on the example project, connect your device click on run or debug, and let it run!

    Make sure the debugger is disconnected, or just unplug your phone when it starts. The debugger will slow down the app by an order of magnitude.

  • OK, importing as existing project doesn't work. I choose the directory (Either one) and it doesn't give me the option to import. I can do import existing android code though.

    yeah, that's the one. Existing project looks for an Eclipse project, which hasn't been created yet. Import android code is the option we want

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • oh, one thing I should mention:

    there is an irritating issue that took a long time to solve: specify a min-sdk version in the manifest. Otherwise, the onSurfaceChanged function in the renderer misreports the device screen size, and you get smaller canvas. Pender handles this gracefully (no crash, no error) but it won't do the demo justice :)

    --edit-- ok, no ant. It must be *somewhere* on your system, as that's what the Eclipse Android SDK plugin uses as a backend, but let's not worry about that. Just go "file->import" and choose import existing Android project. Import both the ExampleProject and the PenderLibraryProject

    --edit 2--

    for the manifest, open AndroidManifest.xml, and right under the top Manifest tag, put:

        <uses-sdk android:minSdkVersion="8" />

    that'll prevent the canvas shrinkage issue :)

  • Ok, I'm up to the build part. I've done everything in the past in Eclipse, what would be the command to build?

    Or should I just use eclipse?

    Step 11: run ant build

    Step 12: adb install bin/yourapkfile.apk

    running in eclipse is fine, I have to resort to it to debug :)

    Just be warned, eclipse will give you a bunch of bullsh*t errors which aren't actually errors.

    command line is quick, try it out, but open up eclipse and "file->import" the example and library project anyway.

    That way you can step through the code on the native side, if you like.

  • I do, I'm on the final few steps and I'll give it a whirl

    woot!

  • OK, I think I got confused. What path to my project? Is one of my projects that i have complated? In APK?

    Nevermind, I think I got it now. reread all the steps and it's making more sense.

    great! Do you have an android device handy?

  • finally, we build our project. Now, I haven't a hot clue if this will work: I think ant is distributed with the Android SDK. Let's find out:

    9. open the main activity for the example project in an editor

    look in PenderExample/src and follow the directory tree down to the activity

    open up the activity located in PenderExample/src/com/pender/example/exampleactivity.java

    10. replace everything under the package statement with:

    import android.app.Activity;

    import android.os.Bundle;

    import com.pender.Pender;

    public class PenderActivity extends Activity

    {

        /** Called when the activity is first created. */

        ody@Override

        public void onCreate(Bundle savedInstanceState)

        {

            super.onCreate(savedInstanceState);

            mPender = new Pender(this);

            mPender.init();

        }

        private Pender mPender;    

    }

    11. build your project,from your PenderExample root, run

    ant debug

    12. install on a device

    adb install bin/blah.apk

    where blah.apk will be something like PenderExample-debug.apk

    Alternatively to step 11, you can now import the Library and Example project to eclipse, and let it build and install for you

  • OK, I figured out what target meant :). One step 2. Woot!

    yeAH!

    almost done!

    6. update the example project so it references the library

    android update project --path <path> --library <libloc>

    "<path>" is path to your project

    "<libloc>" is path to your library

    assuming you've made both in the same toplevel directory as the repo, the command would be:

    android update project --path PenderExample --library PenderAndroidLibrary

    for project called PenderExample

    7. next copy over the assets directory to the client project, not the library

    cp -r pender-android/assets PenderExample/assets

    for project called PenderExample

  • 3. next copy the source from the root of the repo to the root of the library project

    cp -r pender-android/src /path/to/your/pender/library/project/src

    so if you made the pender library in PenderAndroidLibrary in the same directory as the git repo, the command would be:

    cp -r pender-android/src PenderAndroidLibrary/src

    4. next download the Rhino lib: sourceforge.net/projects/penderstaticlib/files/rhino1_7R5pre.jar

    5. put the rhino1_7R5pre.jar file downloaded in 4 in PenderAndroidLibrary/libs

    yeah, target id is the APK, type: "android list targets" to get a full list of the targets installed on your system.

  • ugh, that's ugly. You're running this on a windows machine, aren't you? :)

    grep should be available for cygwin, that will enable the build tool to run the 'android' tool. The create script using grep to swap out arguments. The failure of curl is also likely a platform issue.

    What we need is native windows build tools, but that will take a day at least. Let's see if we can't do this manually.

    first let's run android and create our projects

    1. android create lib-project --name Pender --target <targetid> --path <path> --package com.pender

    where "<targetid>" is replaced with the latest android target and "<path>" is the desired path to the project, call it PenderAndroidLibrary

    2. android create project --target <targetid> --path <path> --package <package> --activity <activityid>

    where "<targetid>" = latest android target

              "<path>" = path to project, should be same dir as the Library Project

              "<package>" = com.pender.example or whatever you want to call your example

              "<activityid>" = name of the main activity of the example, let's go with ArcadeEd

  • My pleasure! Let me know how it goes!

lorinbeer's avatar

lorinbeer

Member since 15 Feb, 2013

None one is following lorinbeer yet!

Connect with lorinbeer

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies