Bitcoin Forum

Bitcoin => Bitcoin Wallet for Android => Topic started by: Apocalipsis on February 04, 2014, 01:24:05 PM



Title: Error while Bitcoin Android wallet compiling process
Post by: Apocalipsis on February 04, 2014, 01:24:05 PM
According to https://github.com/schildbach/bitcoin-wallet/blob/master/wallet/README
I compiled firstly a bitcoinj without any errors.
After that I tried to compile bitcoin-wallet,
and that what I got (
Tell me please,why I got this error?How to solve it?
Thank you.


Code:

[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ wallet ---
[INFO]
[INFO] --- android-maven-plugin:3.7.0:generate-sources (default-generate-sources) @ wallet ---
[DEBUG] Expanding: /root/.m2/repository/com/actionbarsherlock/library/4.1.0/library-4.1.0.apklib into /home/alex/wal/bitcoin-wallet/wallet/target/unpack/apklibs/com.actionbarsherlock_library_apklib_4.1.0
[DEBUG] expand complete
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] Manifest merging disabled. Using project manifest only
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] base .............................................. SUCCESS [12.036s]
[INFO] Bitcoin Integration for Android ................... SUCCESS [1:15.119s]
[INFO] Bitcoin Wallet .................................... FAILURE [1:29.170s]
[INFO] Sample for Bitcoin Integration for Android ........ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:05.611s
[INFO] Finished at: Tue Feb 04 05:18:04 PST 2014
[INFO] Final Memory: 19M/47M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.7.0:generate-sources (default-generate-sources) on project wallet: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.7.0:generate-sources failed: Invalid SDK: Platform/API level 14 not available. This command should give you all you need:
[ERROR] /home/wal/sdk/tools/android update sdk --no-ui --obsolete --force
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :wallet
alex@ubuntu:~/wal/bitcoin-wallet$



Title: Re: Error while Bitcoin Android wallet compiling process
Post by: Mike Hearn on February 04, 2014, 02:02:06 PM
Please read and try a bit harder before asking for help! You just quoted the correct answer in your own post! From the error message:

Code:
Invalid SDK: Platform/API level 14 not available. This command should give you all you need:
[ERROR] /home/wal/sdk/tools/android update sdk --no-ui --obsolete --force

So try running that command and see if it helps.


Title: Re: Error while Bitcoin Android wallet compiling process
Post by: Apocalipsis on February 04, 2014, 06:01:10 PM
Please read and try a bit harder before asking for help! You just quoted the correct answer in your own post! From the error message:

Code:
Invalid SDK: Platform/API level 14 not available. This command should give you all you need:
[ERROR] /home/wal/sdk/tools/android update sdk --no-ui --obsolete --force

So try running that command and see if it helps.

I run this command "/home/wal/sdk/tools/android update sdk --no-ui --obsolete --force",(it downloaded API's)
and again run "mvn clean install with android sdk path".
And I got this error again(
Code:
[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building Bitcoin Wallet 3.30-test
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ wallet ---
[INFO] Deleting /home/alex/wal/bitcoin-wallet/wallet/target
[INFO]
[INFO] --- android-maven-plugin:3.7.0:generate-sources (default-generate-sources) @ wallet ---
[DEBUG] Expanding: /root/.m2/repository/com/actionbarsherlock/library/4.1.0/library-4.1.0.apklib
into /home/alex/wal/bitcoin-wallet/wallet/target/unpack/apklibs/com.actionbarsherlock_library_apklib_4.1.0
[DEBUG] expand complete
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] Manifest merging disabled. Using project manifest only
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] base .............................................. SUCCESS [2.810s]
[INFO] Bitcoin Integration for Android ................... SUCCESS [12.149s]
[INFO] Bitcoin Wallet .................................... FAILURE [2.714s]
[INFO] Sample for Bitcoin Integration for Android ........ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.739s
[INFO] Finished at: Tue Feb 04 13:29:37 PST 2014
[INFO] Final Memory: 18M/43M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.7.0:
generate-sources (default-generate-sources) on project wallet: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.7.0:generate-sources failed:
Invalid SDK: Platform/API level 14 not available. This command should give you all you need:
[ERROR] /home/wal/android-sdk-linux/tools/android update sdk --no-ui --obsolete --force
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :wallet
alex@ubuntu:~/wal/bitcoin-wallet$


Somebody can tell me,why I always get this error.?
Thank you in advance/


Title: Re: Error while Bitcoin Android wallet compiling process
Post by: Andreas Schildbach on February 05, 2014, 09:35:37 AM
Can you list the contents of /home/wal/sdk/platforms/ and see if there is an android-14 directory?


Title: Re: Error while Bitcoin Android wallet compiling process
Post by: Apocalipsis on February 05, 2014, 10:35:04 AM
Can you list the contents of /home/wal/sdk/platforms/ and see if there is an android-14 directory?

I have got it there.
List:

Code:
alex@ubuntu:~/wal/sdk/platforms$ ls
android-10  android-13  android-16  android-19  android-7
android-11  android-14  android-17  android-3   android-8
android-12  android-15  android-18  android-4
alex@ubuntu:~/wal/sdk/platforms$




Title: Re: Error while Bitcoin Android wallet compiling process
Post by: Andreas Schildbach on February 06, 2014, 08:33:05 AM
At the moment I'm out of ideas.

Need to go through the build instructions from scratch on one of my machines.


Title: Re: Error while Bitcoin Android wallet compiling process
Post by: Apocalipsis on February 06, 2014, 01:30:35 PM
At the moment I'm out of ideas.

Need to go through the build instructions from scratch on one of my machines.

ok.thank you.
can you tell me,on which OS did you compile it?


Title: Re: Error while Bitcoin Android wallet compiling process
Post by: Apocalipsis on February 06, 2014, 01:40:14 PM
At the moment I'm out of ideas.

Need to go through the build instructions from scratch on one of my machines.
I have solved this problem,just by reinstalling everything.
When this problem was solved,I got new one.
Code:
[INFO] Building Bitcoin Wallet 3.30-test
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ wallet ---
[INFO] Deleting /home/alex/wal/bitcoin-wallet/wallet/target
[INFO]
[INFO] --- android-maven-plugin:3.7.0:generate-sources (default-generate-sources) @ wallet ---
[DEBUG] Expanding: /root/.m2/repository/com/actionbarsherlock/library/4.1.0/library-4.1.0.apklib into /home/alex/wal/bitcoin-wallet/wallet/target/unpack/apklibs/com.actionbarsherlock_library_apklib_4.1.0
[DEBUG] expand complete
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] Manifest merging disabled. Using project manifest only
[INFO] /home/alex/wal/sdk/build-tools/19.0.1/aapt [package, -m, -J, /home/alex/wal/bitcoin-wallet/wallet/gen, -M, /home/alex/wal/bitcoin-wallet/wallet/AndroidManifest.xml, -S, /home/alex/wal/bitcoin-wallet/wallet/res, -S, /home/alex/wal/bitcoin-wallet/wallet/target/unpack/apklibs/com.actionbarsherlock_library_apklib_4.1.0/res, --auto-add-overlay, -A, /home/alex/wal/bitcoin-wallet/wallet/assets, -I, /home/alex/wal/sdk/platforms/android-14/android.jar]
[INFO] /bin/sh: 1: /home/alex/wal/sdk/build-tools/19.0.1/aapt: not found
[ERROR] Error when generating sources.
org.apache.maven.plugin.MojoExecutionException:
at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR(GenerateSourcesMojo.java:570)
at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.execute(GenerateSourcesMojo.java:206)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: com.jayway.maven.plugins.android.ExecutionException: ANDROID-040-001: Could not execute: Command = /bin/sh -c cd /home/alex/wal/bitcoin-wallet/wallet && /home/alex/wal/sdk/build-tools/19.0.1/aapt package -m -J /home/alex/wal/bitcoin-wallet/wallet/gen -M /home/alex/wal/bitcoin-wallet/wallet/AndroidManifest.xml -S /home/alex/wal/bitcoin-wallet/wallet/res -S /home/alex/wal/bitcoin-wallet/wallet/target/unpack/apklibs/com.actionbarsherlock_library_apklib_4.1.0/res --auto-add-overlay -A /home/alex/wal/bitcoin-wallet/wallet/assets -I /home/alex/wal/sdk/platforms/android-14/android.jar, Result = 127
at com.jayway.maven.plugins.android.CommandExecutor$Factory$DefaultCommandExecutor.executeCommand(CommandExecutor.java:246)
at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR(GenerateSourcesMojo.java:566)
... 22 more
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] base .............................................. SUCCESS [1.896s]
[INFO] Bitcoin Integration for Android ................... SUCCESS [8.462s]
[INFO] Bitcoin Wallet .................................... FAILURE [5.134s]
[INFO] Sample for Bitcoin Integration for Android ........ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.852s
[INFO] Finished at: Thu Feb 06 05:37:24 PST 2014
[INFO] Final Memory: 18M/43M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:
android-maven-plugin:3.7.0:generate-sources (default-generate-sources) on project wallet:
MojoExecutionException: ANDROID-040-001: Could not execute: Command = /bin/sh -c
 cd /home/alex/wal/bitcoin-wallet/wallet && /home/alex/wal/sdk/build-tools/19.0.1/aapt package
-m -J /home/alex/wal/bitcoin-wallet/wallet/gen -M /home/alex/wal/bitcoin-wallet/wallet/AndroidManifest.xml
 -S /home/alex/wal/bitcoin-wallet/wallet/res -S /home/alex/wal/bitcoin-wallet/wallet/target/unpack/apklibs/com.actionbarsherlock_library_apklib_4.1.0/res --auto-add-overlay
-A /home/alex/wal/bitcoin-wallet/wallet/assets -I /home/alex/wal/sdk/platforms/android-14/android.jar,
 Result = 127 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :wallet
alex@ubuntu:~/wal/bitcoin-wallet$

And I really don't get,why if I make everything via instructions,I still get errors)



Title: Re: Error while Bitcoin Android wallet compiling process
Post by: Andreas Schildbach on February 06, 2014, 03:27:54 PM
Did you unpack the Android SDK and use "tools/android update sdk --no-ui --force --filter platform,platform-tools"?


Title: Re: Error while Bitcoin Android wallet compiling process
Post by: Apocalipsis on February 07, 2014, 06:17:14 PM
Did you unpack the Android SDK and use "tools/android update sdk --no-ui --force --filter platform,platform-tools"?

Yes.Exatcly.
I did everything via instruction


Title: Re: Error while Bitcoin Android wallet compiling process
Post by: Apocalipsis on February 17, 2014, 07:16:03 AM
Did you unpack the Android SDK and use "tools/android update sdk --no-ui --force --filter platform,platform-tools"?

Did you go over my issue?
I still can't compile it.
I 've reinstalled everything)
I don't know what to do/


Title: Re: Error while Bitcoin Android wallet compiling process
Post by: antoszy on March 12, 2014, 01:17:28 AM
I had similar problem. It turned out to be a problem with 64-bit system not having some 32-bit libraries. Don't exactly remember what libraries these were. Without those libraries you can't run
/home/alex/wal/sdk/build-tools/19.0.1/aapt
Try to run it in terminal and as I remember linux will tell you what library you need, than you install it with apt-get and try to run this file again and after several times you will have all the libraries you need.


Title: Re: Error while Bitcoin Android wallet compiling process
Post by: joshafest on November 28, 2015, 03:12:29 PM
I had similar problem. It turned out to be a problem with 64-bit system not having some 32-bit libraries. Don't exactly remember what libraries these were. Without those libraries you can't run
/home/alex/wal/sdk/build-tools/19.0.1/aapt
Try to run it in terminal and as I remember linux will tell you what library you need, than you install it with apt-get and try to run this file again and after several times you will have all the libraries you need.
the new sdk have changed "aat" dir from plateform-tools to build- tools
you need either downgrade sdk or change dir