0

I am new to android and i try to integrate Paypal in Android. I follow this official tutorial

https://github.com/paypal/PayPal-Android-SDK/blob/master/docs/single_payment.md

I got the following error

uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.paypal.sdk:paypal-android-sdk:2.14.3] /home/developer/Desktop/Jac - Android/jac/build/intermediates/exploded-aar/com.paypal.sdk/paypal-android-sdk/2.14.3/AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="com.paypal.android.sdk.payments" to force usage

I write this code in the menifest file and this error removes:

 xmlns:tools="http://schemas.android.com/tools">
    <uses-sdk tools:overrideLibrary="com.paypal.android.sdk.payments"/>

But it generate few more errors:

FATAL EXCEPTION: OkHttp Dispatcher
Process: com.knysys.jac.jaclassified, PID: 1982
java.lang.NoSuchMethodError: No virtual method log(Ljava/lang/String;)V in class Lokhttp3/internal/Platform; or its super classes (declaration of 'okhttp3.internal.Platform' 
appears in /data/app/com.knysys.jac.jaclassified-2/base.apk)
at okhttp3.logging.HttpLoggingInterceptor$Logger$1.log(HttpLoggingInterceptor.java:108)
 at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:157)
 at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
 at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
 at okhttp3.RealCall.access$100(RealCall.java:30)
 at okhttp3.RealCall$AsyncCall.execute(RealCall.java:127)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
 at java.lang.Thread.run(Thread.java:818)

I have these dependencies in my gradle still i get these issues

  compile 'com.squareup.retrofit2:retrofit:2.0.0-beta3'
  compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta3'
  compile 'com.squareup.okhttp3:logging-interceptor:3.0.0-RC1'

Where am i wrong. Why it generate such an error. Any help or any other solution to achieve that. Thankyou.

fmashkoor
  • 113
  • 1
  • 2
  • 6

2 Answers2

0

Make changes in your manifest :-

<manifest xmlns:android="http://schemas.android.com/apk/res/android"  
        package="com.javatpoint.hello"  
        android:versionCode="1"  
        android:versionName="1.0" >  

        <uses-sdk  
            android:minSdkVersion=""  //change minSDK to 16 or more
            android:targetSdkVersion="" />  //change targetSdk to 19 or more

        <application  
            android:icon="@drawable/ic_launcher"  
            android:label="@string/app_name"  
            android:theme="@style/AppTheme" >  
            <activity  
                android:name=".MainActivity"  
                android:label="@string/title_activity_main" >  
                <intent-filter>  
                    <action android:name="android.intent.action.MAIN" />  

                    <category android:name="android.intent.category.LAUNCHER" />  
                </intent-filter>  
            </activity>  
        </application>  

    </manifest>  
  • Still get the same error . " FATAL EXCEPTION: OkHttp Dispatcher ..... " – fmashkoor Jul 05 '16 at 10:48
  • I follow the same tutorial which i mentioned above. i add the library in gradle even i use some other tutorial as well but get the same issue. – fmashkoor Jul 05 '16 at 11:35