jackba / bitcoinspinner

Automatically exported from code.google.com/p/bitcoinspinner
0 stars 0 forks source link

Crash on startup with 0.8.3b #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Launch app built from source via fdroid recipe. It crashes on CM10.1 (Android 
4.2.2):

Build Version:0.8.3b,38,89,subdir=BitcoinSpinner,\
build=ant bitlib-jar -f ../bitlib/build.xml && mkdir -p libs/ && \
      ant all -f ../bccapi/build.xml && mv ../bccapi/out/bccapi.jar libs/

I/ActivityManager(  376): Start proc com.miracleas.bitcoin_spinner for activity 
com.miracleas.bitcoin_spinner/.Main: pid=12560 uid=10109 gids={50109, 3003, 
1028}
I/dalvikvm(12560): Turning on JNI app bug workarounds for target SDK version 
7...
E/Trace   (12560): error opening trace file: No such file or directory (2)
I/dalvikvm(12560): Failed resolving 
Lcom/miracleas/bitcoin_spinner/SendBitcoinsActivity; interface 122 
'Lcom/bccapi/ng/async/AbstractCallbackHandler;'
W/dalvikvm(12560): Link of class 
'Lcom/miracleas/bitcoin_spinner/SendBitcoinsActivity;' failed
E/dalvikvm(12560): Could not find class 
'com.miracleas.bitcoin_spinner.SendBitcoinsActivity', referenced from method 
com.miracleas.bitcoin_spinner.Main.onCreate
W/dalvikvm(12560): VFY: unable to resolve const-class 437 
(Lcom/miracleas/bitcoin_spinner/SendBitcoinsActivity;) in 
Lcom/miracleas/bitcoin_spinner/Main;
D/dalvikvm(12560): VFY: replacing opcode 0x1c at 0x0036
W/dalvikvm(12560): VFY: unable to resolve static field 9 (productionNetwork) in 
Lcom/bccapi/bitlib/model/NetworkParameters;
D/dalvikvm(12560): VFY: replacing opcode 0x62 at 0x005f
D/AndroidRuntime(12560): Shutting down VM
W/dalvikvm(12560): threadid=1: thread exiting with uncaught exception 
(group=0x40bb3930)
E/AndroidRuntime(12560): FATAL EXCEPTION: main
E/AndroidRuntime(12560): java.lang.NoClassDefFoundError: 
com.bccapi.bitlib.model.NetworkParameters
E/AndroidRuntime(12560):    at 
com.miracleas.bitcoin_spinner.Main.onCreate(Main.java:33)
E/AndroidRuntime(12560):    at 
android.app.Activity.performCreate(Activity.java:5104)
E/AndroidRuntime(12560):    at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime(12560):    at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2261)
E/AndroidRuntime(12560):    at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2357)
E/AndroidRuntime(12560):    at 
android.app.ActivityThread.access$600(ActivityThread.java:153)
E/AndroidRuntime(12560):    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
E/AndroidRuntime(12560):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(12560):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(12560):    at 
android.app.ActivityThread.main(ActivityThread.java:5226)
E/AndroidRuntime(12560):    at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime(12560):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(12560):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
E/AndroidRuntime(12560):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
E/AndroidRuntime(12560):    at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager(  376):   Force finishing activity 
com.miracleas.bitcoin_spinner/.Main
W/ActivityManager(  376): Activity pause timeout for ActivityRecord{40e5e4e8 u0 
com.miracleas.bitcoin_spinner/.Main}

Original issue reported on code.google.com by david8bl...@gmail.com on 12 Aug 2013 at 4:37

GoogleCodeExporter commented 9 years ago
It seems that you haven't included bitlib and/or bccapi into the 
build/classpath. There are 3 basic components BitcoinSpinner depends on bccapi, 
which in turn depends on bitlib.

Original comment by jan.mol...@gmail.com on 12 Aug 2013 at 6:41

GoogleCodeExporter commented 9 years ago
I've tried copying bitlib jar into BitcoinSpinner/libs but it still doesn't 
work. Version 0.8.2b on f-droid.org works, yet when I try to run that version 
built from source, it crashes. This makes me suspect that it's something to do 
with updates to the Android SDK; although it could easily be my confusion over 
classpaths — the BitcoinSpinner/libs/bccapi.jar has 
com/bccapi/bitlib/model/NetworkParameters.class and I always thought that was 
enough.

Original comment by david8bl...@gmail.com on 12 Aug 2013 at 8:03

GoogleCodeExporter commented 9 years ago
The log is full of this kind of thing:

    [dex] Pre-Dexing /home/gerry/fdroiddata/build/com.miracleas.bitcoin_spinner/BitcoinSpinner/libs/bitlib.jar -> bitlib-bcb9f1f05dccb8ba88627b68590b7bcb.jar
       [dx]
       [dx] trouble processing:
       [dx] bad class file magic (cafebabe) or version (0033.0000)
       [dx] ...while parsing com/bccapi/bitlib/StandardTransactionBuilder$1.class
       [dx] ...while processing com/bccapi/bitlib/StandardTransactionBuilder$1.class
       [dx]
       [dx] trouble processing:

Original comment by david8bl...@gmail.com on 12 Aug 2013 at 8:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I've managed to get it to work by flattening it:

Build Version:0.8.3b,38,89,subdir=BitcoinSpinner,\
target=android-10,\
prebuild=mkdir -p src/com/bccapi/ && \
         mv ../bitlib/src/com/bccapi/bitlib src/com/bccapi/ && \
         mv ../bccapi/src/com/bccapi/* src/com/bccapi

Original comment by david8bl...@gmail.com on 12 Aug 2013 at 8:58

GoogleCodeExporter commented 9 years ago
Great, can you send me the final gradle config files you use?

Original comment by jan.mol...@gmail.com on 13 Aug 2013 at 8:23

GoogleCodeExporter commented 9 years ago
The gradle config is simple , it uses a similar trick as my ant build, 
specifying multiple source directories instead of building jars. Ant is no 
longer able to use multiple dirs which is why I needed to copy the files. I'll 
post it later.

The target=android-10 is important as android-8 fails with some strange errors.

Original comment by david8bl...@gmail.com on 13 Aug 2013 at 8:32

GoogleCodeExporter commented 9 years ago
I am not that proficient with gradle, so if you can give me the config file I 
can take a look: jan.moller@gmail.com

Original comment by jan.mol...@gmail.com on 13 Aug 2013 at 8:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.5.+'
    }
}

apply plugin: 'android'

android {
    compileSdkVersion 10
    buildToolsVersion "18.0.1"

    sourceSets {
      main {
        manifest.srcFile 'AndroidManifest.xml'
        aidl.srcDirs = ['src']
        java.srcDirs = ['../bitlib/src', '../bccapi/src', 'src']
        res.srcDirs = ['res']
        assets.srcDirs = ['assets']
      }
    }
}

Original comment by david8bl...@gmail.com on 13 Aug 2013 at 9:29

GoogleCodeExporter commented 9 years ago
Thanks, added build.gradle

Original comment by jan.mol...@gmail.com on 13 Aug 2013 at 12:36