title: Bitcoinj library on android hung on installing APK
body: <p>I am trying to get a basic running app that would use the bitcoinj library to create a wallet and sync. Very basic. I used bitcoinj library for my desktop application with no problems. When i try to make one for android it hangs on "...Installing APK" when trying to run it on my phone.</p>
  
  <p>This is my code.</p>
  
  <pre><code>import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.widget.ProgressBar;
  import org.bitcoinj.core.Context;
  import org.bitcoinj.core.NetworkParameters;
  import org.bitcoinj.core.listeners.DownloadProgressTracker;
  import org.bitcoinj.kits.WalletAppKit;
  import org.bitcoinj.params.TestNet3Params;
  
  import java.io.File;
  import java.util.Date;
  
  public class MainActivity extends AppCompatActivity {
  
      public static NetworkParameters BTCparams = TestNet3Params.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);
          Context.propagate(new Context(BTCparams));
          DownloadProgressTracker BTCListener = new DownloadProgressTracker() {
              @Override
              public void progress(double pct, int blocksSoFar, Date date) {
                  System.out.println("Syncing..."+pct+"%");
                  BTCProgress.setProgress((int) pct);
              }
              @Override
              public void doneDownload() {
                  System.out.println("Sync Done.");
                  BTCProgress.setProgress(100);
              }
          };
          BTCkit.setDownloadListener(BTCListener).setBlockingStartup(false).startAsync().awaitRunning();
      }
  }
  </code></pre>
  
  <p>This is my build.gradle in my app folder.</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.example.testapp.testapp"
          minSdkVersion 21
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.android.support:design:28.0.0'
      implementation 'org.bitcoinj:bitcoinj-core:0.14.7'
      implementation 'org.slf4j:slf4j-api:1.7.12'
      implementation 'org.slf4j:slf4j-simple:1.7.12'
  }
  </code></pre>
  
  <p>I eventually get this dialog box.</p>
  
  <p><a href="https://ibb.co/dOCjuq" rel="nofollow noreferrer">Dialog</a></p>
  
  <p>When i click ok i get this error.</p>
  
  <p><a href="https://ibb.co/dL7W7A" rel="nofollow noreferrer">Error</a></p>
  
  <p>which brings you to here...</p>
  
  <p><a href="https://ibb.co/kAdtLV" rel="nofollow noreferrer">Binder.java</a></p>
  
  <p>I am stumped and cannot figure out why this isnt working. I suspect once i resolve this issue then my development will be a breeze. Please provide details as im still learning the android development.</p>