This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Cant run the NordicSemiconductor's Puck-central-android code

I have download the puck-central-android code from the following link github.com/.../puck-central-android

I can build the project and successfully programmed in the android tablet. In runtime i get the following errors.

10-08 16:23:45.602: D/dalvikvm(29474): GC_FOR_ALLOC freed 3031K, 40% free 7009K/11660K, paused 16ms, total 16ms 10-08 16:23:45.602: D/hwcutils(2287): MppFactory::MppFactory() 10-08 16:23:45.602: D/(2287): virtual LibMpp* MppFactory::CreateMpp(int, int, int, int)(6) 10-08 16:23:45.602: D/libexynosgscaler(2287): LibMpp::LibMpp() 10-08 16:23:45.612: D/AndroidRuntime(29474): Shutting down VM 10-08 16:23:45.612: W/dalvikvm(29474): threadid=1: thread exiting with uncaught exception (group=0x41fe9c08) 10-08 16:23:45.612: E/rsC++(3336): RS Message thread exiting. 10-08 16:23:45.612: E/OpenGLRenderer(3336): SFEffectCache:clear(), mSize = 0 10-08 16:23:45.612: D/Launcher(3336): onTrimMemory. Level: 80 10-08 16:23:45.612: D/Launcher(3336): releaseShadows called 10-08 16:23:45.612: E/AndroidRuntime(29474): FATAL EXCEPTION: main 10-08 16:23:45.612: E/AndroidRuntime(29474): Process: no.nordicsemi.puckcentral, PID: 29474 10-08 16:23:45.612: E/AndroidRuntime(29474): java.lang.RuntimeException: Unable to instantiate application no.nordicsemi.puckcentral.Application: java.lang.ClassNotFoundException: Didn't find class "no.nordicsemi.puckcentral.Application" on path: DexPathList[[zip file "/data/app/no.nordicsemi.puckcentral-1.apk"],nativeLibraryDirectories=[/data/app-lib/no.nordicsemi.puckcentral-1, /vendor/lib, /system/lib]] 10-08 16:23:45.612: E/AndroidRuntime(29474): at android.app.LoadedApk.makeApplication(LoadedApk.java:516) 10-08 16:23:45.612: E/AndroidRuntime(29474): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4722) 10-08 16:23:45.612: E/AndroidRuntime(29474): at android.app.ActivityThread.access$1600(ActivityThread.java:172) 10-08 16:23:45.612: E/AndroidRuntime(29474): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1368) 10-08 16:23:45.612: E/AndroidRuntime(29474): at android.os.Handler.dispatchMessage(Handler.java:102) 10-08 16:23:45.612: E/AndroidRuntime(29474): at android.os.Looper.loop(Looper.java:146) 10-08 16:23:45.612: E/AndroidRuntime(29474): at android.app.ActivityThread.main(ActivityThread.java:5653) 10-08 16:23:45.612: E/AndroidRuntime(29474): at java.lang.reflect.Method.invokeNative(Native Method) 10-08 16:23:45.612: E/AndroidRuntime(29474): at java.lang.reflect.Method.invoke(Method.java:515) 10-08 16:23:45.612: E/AndroidRuntime(29474): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291) 10-08 16:23:45.612: E/AndroidRuntime(29474): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107) 10-08 16:23:45.612: E/AndroidRuntime(29474): at dalvik.system.NativeStart.main(Native Method) 10-08 16:23:45.612: E/AndroidRuntime(29474): Caused by: java.lang.ClassNotFoundException: Didn't find class "no.nordicsemi.puckcentral.Application" on path: DexPathList[[zip file "/data/app/no.nordicsemi.puckcentral-1.apk"],nativeLibraryDirectories=[/data/app-lib/no.nordicsemi.puckcentral-1, /vendor/lib, /system/lib]] 10-08 16:23:45.612: E/AndroidRuntime(29474): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67) 10-08 16:23:45.612: E/AndroidRuntime(29474): at java.lang.ClassLoader.loadClass(ClassLoader.java:497) 10-08 16:23:45.612: E/AndroidRuntime(29474): at java.lang.ClassLoader.loadClass(ClassLoader.java:457) 10-08 16:23:45.612: E/AndroidRuntime(29474): at android.app.Instrumentation.newApplication(Instrumentation.java:981) 10-08 16:23:45.612: E/AndroidRuntime(29474): at android.app.LoadedApk.makeApplication(LoadedApk.java:511) 10-08 16:23:45.612: E/AndroidRuntime(29474): ... 11 more 10-08 16:23:45.617: W/ManagedEGLContext(3336): doTerminate failed: EGL count is 3 but managed count is 1 10-08 16:23:45.617: W/ActivityManager(2855): Force finishing activity no.nordicsemi.puckcentral/.activities.MainActivity 10-08 16:23:45.637: I/dalvikvm-heap(2855): Grow heap (frag case) to 55.137MB for 774416-byte allocation

How can I run this application properly? Am i missing some java file?

Thanks

Parents
  • Hi,

    As far as I can understand this application requires libraries:

    github.com/.../droidparts

    http://www.joda.org/joda-time/

    Are you using Android Studio or Eclipse ADT? I've tried to run it on Eclipse and this is what I needed to do:

    1. In the AndroidManifest.xml file at the bottom, in <meta..> remove the ".puckcentral", so that it look like this:

       <meta-data
           android:name="droidparts_dependency_provider"
           android:value=".DependencyProvider" />
      
    2. Move the res/playstore-icon.png one folder up as Eclipse don't like files directly in res folder

    3. Set the minumum API and target API in the manifest and assign versionCode and versionNumber

    4. In case of working in Eclipse you have to extract jar files from aar libraries, rename them to any name, and copy to libs folder (folder must be created)

    5. Download libraries from links above and copy them to libs folder. In case of Android Studio you may add references to those libraries to gradle file, I guess.

    Finally I had no errors in the project and the application started. However I don't know what the app should do.. I just have a white screen with black action bar and a menu item "trigger" which does nothing. Maybe this is because I have no any Puck here?

Reply
  • Hi,

    As far as I can understand this application requires libraries:

    github.com/.../droidparts

    http://www.joda.org/joda-time/

    Are you using Android Studio or Eclipse ADT? I've tried to run it on Eclipse and this is what I needed to do:

    1. In the AndroidManifest.xml file at the bottom, in <meta..> remove the ".puckcentral", so that it look like this:

       <meta-data
           android:name="droidparts_dependency_provider"
           android:value=".DependencyProvider" />
      
    2. Move the res/playstore-icon.png one folder up as Eclipse don't like files directly in res folder

    3. Set the minumum API and target API in the manifest and assign versionCode and versionNumber

    4. In case of working in Eclipse you have to extract jar files from aar libraries, rename them to any name, and copy to libs folder (folder must be created)

    5. Download libraries from links above and copy them to libs folder. In case of Android Studio you may add references to those libraries to gradle file, I guess.

    Finally I had no errors in the project and the application started. However I don't know what the app should do.. I just have a white screen with black action bar and a menu item "trigger" which does nothing. Maybe this is because I have no any Puck here?

Children
Related