Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this communityAnybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
I have no experience with android programming. I am just trying to build a simple wallet.
Following is the trial code:
import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.widget.ProgressBar; import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.params.MainNetParams; import java.io.File; import java.util.Date; public class MainActivity extends AppCompatActivity { public static NetworkParameters BTCparams = MainNetParams.get(); public static WalletAppKit BTCkit = new WalletAppKit(BTCparams,new File("."),"BTC-Test"); private ProgressBar BTCProgress; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); BTCProgress = findViewById(R.id.BTCProgress); BTCProgress.setProgress((int) 50); BTCkit.startAsync(); BTCkit.awaitRunning(); } }
activity_main.xml:
<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_"match_parent" android:layout_"match_parent" tools:context=".MainActivity"> <TextView android:id="@+id/textView" android:layout_"wrap_content" android:layout_"wrap_content" android:text="Hello World!" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <ProgressBar android:id="@+id/BTCProgress" style="?android:attr/progressBarStyleHorizontal" android:layout_"wrap_content" android:layout_"wrap_content" app:layout_constraintBottom_toTopOf="@+id/textView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout>
I tried launching on pixel 2 API 32 as well as my mobile oneplus 6t API 30. It fails to starts and fails repeatedly:
9:54 AM * daemon not running; starting now at tcp:5037 9:54 AM * daemon started successfully 9:54 AM * daemon not running; starting now at tcp:5037 9:54 AM * daemon started successfully
It feels like a memory issue to me. Not sure how to resolve it. Please help me resolve the issue.
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments