Pender Android for Phonegap Cordova

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Since it was on the last page you might miss this.

    <img src="http://content.screencast.com/users/ArcadEd/folders/Jing/media/99db3878-b555-4e81-84b8-1bc8eaec75e3/2013-03-20_0032.png" border="0" />

    Do I build the project or library? Project has errors, won't let me build

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

  • Can't resolve com.pender in the arcaded.java. Did I miss a step somewhere?

    What is the point of importing the library into eclipse? Seems like it's just comes in as a separate project.

  • AH! we forgot a step!

    go back to cygwin, we need to update the example project with the library project

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

    where "<path>" is path to example (arcaded) and "<libloc>" is path to the library

    --edit-- whereby "we", we mean "I"

    --edit 2-- Eclipse won't properly compile and include the library project unless it is in the workspace, so we need to import it as well. It will also allow us to properly debug Pender if a problem occurs in the Library, which is likely as the Client project includes almost no native code

  • Z:\java\DroidSDK\sdk\tools>android update project --path z:\arcaded --library z:\PenderAndroidLibrary

    Resolved location of library project to: z:\PenderAndroidLibrary

    Updated project.properties

    Updated local.properties

    Updated file z:\arcaded\proguard-project.txt

    It seems that there are sub-projects. If you want to update them

    please use the --subprojects parameter.

    OK, still imported with the same errors.

    <img src="http://content.screencast.com/users/ArcadEd/folders/Jing/media/88496b09-46a4-4d0a-8025-1a69046d7f9c/2013-03-20_0046.png" border="0" />

  • try f5 or right clicking on the workspace navigator and choosing "refresh"

    if that doesn't work, try deleting the project and library from eclipse and re-importing them. Just make sure "delete off of filesystem" is unchecked

  • OK, did all that plus a clean. Same as the picture above

    And thank you so much for your help. I probably gotta get to sleep pretty quick. From work tomorrow I will try all the steps again and see if i missed something somewhere.

    Plus I am sure Wink will be jumping on tomorrow to try it as well.

  • ok, I need to see what's in a few files, can you skype?

    files I need a peak at are

    libraryproject/com/pender/Pender.java

    and the project.properties files

    yeah, I should crash too. Given that the AndroidLibrary is throwing no errors, I think you did everything fine. This is an eclipse bs thing, it's not seeing the LibraryProject in the workspace.

    There's a couple of things we can try, should only take a few minutes

  • Tomorrow I can for sure, now I gotta be up in 5 hours, so it's sleep time. My skype is ArcadEd

    I zipped up the 2 folders in case they help.

    edfarias.com/arcaded.zip

    Thanks again.

    If you want to post what to try go for it, I can try it first thing tomorrow.

  • ok, no worries, I see the problem in project.properties, we can fix it easy

    simple problem: the android library reference has to be given as a relative offset from the root of your project,

    so instead of

    android update project --path <projectpath> --library <librarypath>

    it should be

    update project --path <projectpath> --library <offset/path/to/library/from/project/root>

    in your case, that's:

    android update project --path arcaded --library ../PenderAndroidLibrary

  • both are in the root of my z drive.

    I did android update project --path z:\arcaded --library z:\PenderAndroidLibrary

    so instead I should do it as:

    android update project --path z:\arcaded --library ../PenderAndroidLibrary

    ??

    OK, I got it to build.

    I just get a FORCE CLOSE on droid device. :)

  • what does the log say when the app boots up?

    do this:

    adb logcat

    that will bring up the log, and show you a stacktrace of the error

  • I/PackageManager( 1638): setEnabledSetting(), pkgName=com.tunewiki.lyricplayer.

    android, clsName=com.tunewiki.lyricplayer.android.common.NotificationsAlarmManag

    er$BootAndMediaMountReceiver, state=1, flag=1, pid=29328, uid=10041

    D/DEBUG   ( 1813): updateCellLayoutCache(3.5555556, 3.5607476)

    D/PowerManagerService( 1638): New lightsensor value:160, lcdValue:94

    D/PowerManagerService( 1638): lightSensorChangedLocked, buttonValue >= 0, mPower

    State = 3

    I/Process (29309): Sending signal. PID: 29309 SIG: 9

    D/InputManagerService( 1638): Window already focused, ignoring focus gain of: co

    m.android.internal.view.IInputMethodClient$Stub$Proxyopi@40d05048

    I/ActivityManager( 1638): Process com.arcaded (pid 29309) has died.

    D/PeopleApp( 2189): Auto requerying AllPeopleCursor due to update - 25 contacts

    D/dalvikvm( 7591): GC_EXPLICIT freed 14K, 39% free 4658K/7623K, external 1K/751K

    , paused 64ms

    D/Background traffic light( 1813): traffic light: GREEN, mBackgroundTrafficLight

    = false

    D/AutoSetting( 1914): service - mRequestRunnable: screen on delay 10s, request N

    LP now

    D/AutoSetting( 1914): service - requestNLP() to last request within 2hrs, don't

    request 250019

    V/HtcAppUsageStats( 1638): handleMessage msg=1

    I/ActivityManager( 1638): Starting activity: Intent { act=android.intent.action.

    MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.arcaded/.arca

    ded } from pid 1813

    V/HtcAppUsageStats( 1638): (launch app, package): (arcaded, com.arcaded)

    D/PhoneWindow( 1813): couldn't save which view has focus because the focused vie

    w com.android.internal.policy.impl.PhoneWindow$DecorViewopi@40568e28 has no id.

    D/Background traffic light( 1813): traffic light: GREEN, mBackgroundTrafficLight

    = true

    I/ActivityManager( 1638): Start proc com.arcaded for activity com.arcaded/.arcad

    ed: pid=29336 uid=10130 gids={}

    D/SensorService( 1638): enable: get sensor name = BMA150 3-axis Accelerometer

    D/Sensors ( 1638): Enable akm: en = 1

    D/SensorService( 1638): pid=1638, uid=1000

    D/AK8975 ( 1525): Compass Start

    D/AK8975 ( 1525): Ignore M_Sensor: (y, p, r) = ( 133,   -3,    0), Status = 3

    D/AndroidRuntime(29336): Shutting down VM

    W/dalvikvm(29336): threadid=1: thread exiting with uncaught exception (group=0x4

    001d5a0)

    E/AndroidRuntime(29336): FATAL EXCEPTION: main

    E/AndroidRuntime(29336): java.lang.RuntimeException: Unable to instantiate activ

    ity ComponentInfo{com.arcaded/com.arcaded.arcaded}: java.lang.ClassNotFoundExcep

    tion: com.arcaded.arcaded in loader dalvik.system.PathClassLoader[/data/app/com. arcaded-1.apk]

    E/AndroidRuntime(29336):        at android.app.ActivityThread.performLaunchActiv

    ity(ActivityThread.java:1743)

    E/AndroidRuntime(29336):        at android.app.ActivityThread.handleLaunchActivi

    ty(ActivityThread.java:1851)

    E/AndroidRuntime(29336):        at android.app.ActivityThread.access$1500(Activi

    tyThread.java:132)

    E/AndroidRuntime(29336):        at android.app.ActivityThread$H.handleMessage(Ac

    tivityThread.java:1038)

    E/AndroidRuntime(29336):        at android.os.Handler.dispatchMessage(Handler.ja

    va:99)

    E/AndroidRuntime(29336):        at android.os.Looper.loop(Looper.java:150)

    E/AndroidRuntime(29336):        at android.app.ActivityThread.main(ActivityThrea

    d.java:4293)

    E/AndroidRuntime(29336):        at java.lang.reflect.Method.invokeNative(Native

    Method)

    E/AndroidRuntime(29336):        at java.lang.reflect.Method.invoke(Method.java:5

    07)

    E/AndroidRuntime(29336):        at com.android.internal.os.ZygoteInit$MethodAndA

    rgsCaller.run(ZygoteInit.java:839)

    E/AndroidRuntime(29336):        at com.android.internal.os.ZygoteInit.main(Zygot

    eInit.java:597)

    E/AndroidRuntime(29336):        at dalvik.system.NativeStart.main(Native Method)

    E/AndroidRuntime(29336): Caused by: java.lang.ClassNotFoundException: com.arcade

    d.arcaded in loader dalvik.system.PathClassLoader[/data/app/com.arcaded-1.apk]

    E/AndroidRuntime(29336):        at dalvik.system.PathClassLoader.findClass(PathC

    lassLoader.java:240)

    E/AndroidRuntime(29336):        at java.lang.ClassLoader.loadClass(ClassLoader.j

    ava:551)

    E/AndroidRuntime(29336):        at java.lang.ClassLoader.loadClass(ClassLoader.j

    ava:511)

    E/AndroidRuntime(29336):        at android.app.Instrumentation.newActivity(Instr

    umentation.java:1040)

    E/AndroidRuntime(29336):        at android.app.ActivityThread.performLaunchActiv

    ity(ActivityThread.java:1735)

    E/AndroidRuntime(29336):        ... 11 more

    W/ActivityManager( 1638):   Force finishing activity com.arcaded/.arcaded

    W/dalvikvm( 1813): disableGcForExternalAlloc: false

    W/System.err( 7676): java.io.IOException: Permission denied

    W/System.err( 7676):    at java.io.File.createNewFileImpl(Native Method)

    W/System.err( 7676):    at java.io.File.createNewFile(File.java:1257)

    W/System.err( 7676):    at com.idreamsky.lib.g.k.a(SourceFile:254)

    W/System.err( 7676):    at com.idreamsky.gamecenter.service.a.a(SourceFile:102)

    W/System.err( 7676):    at com.idreamsky.gamecenter.service.a.b(SourceFile:78)

    W/System.err( 7676):    at com.idreamsky.gamecenter.service.c.handleMessage(Sour

    ceFile:328)

    W/System.err( 7676):    at android.os.Handler.dispatchMessage(Handler.java:99)

    W/System.err( 7676):    at android.os.Looper.loop(Looper.java:150)

    W/System.err( 7676):    at android.os.HandlerThread.run(HandlerThread.java:60)

    W/System.err( 7676):    at com.idreamsky.gamecenter.service.a.run(SourceFile:173

    )

    W/ActivityManager( 1638): Activity pause timeout for HistoryRecord{4057ffa0 com.

    arcaded/.arcaded}

    D/SensorService( 1638): disable: get sensor name = BMA150 3-axis Accelerometer

    D/Sensors ( 1638): Enable akm: en = 0

    D/SensorService( 1638): pid=1638, uid=1000

    I/CarouselTimeLog( 1813): onStart() finish: 1363791660737

    D/CarouselDummyActivity( 1813): CarouselDummyActivity.onResume: tab_allapps

    D/Background traffic light( 1813): traffic light: RED, mBackgroundTrafficLight =

    true

    D/William ( 1813): - refreshUsageStatCache -

    D/AK8975 ( 1525): Compass CLOSE

    If that helps. I might try the whole process from start to finish again today just making sure I don't miss anything.

  • Yeah, the stack trace seems to indicate that it can't load your main activity, which doesn't have anything to do with Pender perse. It's claiming it can't find your main activity class in the package it compiles from your main activity class <img src="smileys/smiley17.gif" border="0" align="middle" />. Gotta love Eclipse.

    can you zip up your whole project folder and send it to me? If I can see the code, I can probably sort this out in under 30 seconds,<swordfishref> with John Travolta pointing a gun at my head and yelling at me to hack </swordfishref>

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)