2016-11-11 5 views
0

Über가 Moto X 2 Gen에서 관리하고 라이브러리가 작동하지 않는 것처럼 환상적인 card.io library을 사용하여 신용 카드를 스캔하려고합니다. . 그것은 안드로이드 모니터에 다음과 같은 출력 제공 : 우버이 같은 전화에서 제대로 작동 않으며,이 card.io를 사용하지 때문에Android 라이브러리 card.io가 Moto X 2nd Gen에서 카메라를 건너 뛰고 스캔하지 않음

I/card.io: card.io 5.4.2 09/27/2016 11:38:46 -0500 
E/card.io: Failed to load native library: dlopen failed: cannot locate symbol "__aeabi_memcpy" 
    referenced by "/data/app/br.com.feliperochamachado.cardscantest-2/lib/arm/libcardioDecider.so"... 
I/card.io: Processor not Supported. Skipping camera. 

, 나는 내 설정에 문제라고 생각을하지만, 그것은 매우 간단합니다 테스트 애플 리케이션은 barebones 지침을 재현하여 작동하도록 시도합니다. 여기 내 gradle.build 파일입니다

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 24 
    buildToolsVersion "24.0.0" 
    defaultConfig { 
     applicationId "br.com.feliperochamachado.cardscantest" 
     minSdkVersion 19 
     targetSdkVersion 24 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:24.1.1' 
    compile 'io.card:android-sdk:5.4.2' 
    testCompile 'junit:junit:4.12' 
} 

그리고 여기 내 manifest.xml입니다 :

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="br.com.feliperochamachado.cardscantest"> 

    <!-- Permission to vibrate - recommended, allows vibration feedback on scan --> 
    <uses-permission android:name="android.permission.VIBRATE" /> 

    <!-- Permission to use camera - required --> 
    <uses-permission android:name="android.permission.CAMERA" /> 

    <!-- Camera features - recommended --> 
    <uses-feature android:name="android.hardware.camera" android:required="false" /> 
    <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" /> 
    <uses-feature android:name="android.hardware.camera.flash" android:required="false" /> 

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

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

     <!-- Activities responsible for gathering payment info --> 
     <activity android:name="io.card.payment.CardIOActivity" android:configChanges="keyboardHidden|orientation" /> 
     <activity android:name="io.card.payment.DataEntryActivity" /> 
    </application> 

</manifest> 

스캔 작업을 호출하는 코드는 다음과 같습니다

public void onScanPress(View v) { 
    Intent scanIntent = new Intent(this, CardIOActivity.class); 

    // customize these values to suit your needs. 
    scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true); // default: false 
    scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, false); // default: false 
    scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_POSTAL_CODE, false); // default: false 

    // MY_SCAN_REQUEST_CODE is arbitrary and is only used within this activity. 
    startActivityForResult(scanIntent, MY_SCAN_REQUEST_CODE); 
} 

그리고 내 레이아웃입니다 매우 간단합니다 :

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:id="@+id/activity_main" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:paddingBottom="@dimen/activity_vertical_margin" 
    android:paddingLeft="@dimen/activity_horizontal_margin" 
    android:paddingRight="@dimen/activity_horizontal_margin" 
    android:paddingTop="@dimen/activity_vertical_margin" 
    android:orientation="vertical" 
    tools:context="br.com.feliperochamachado.cardscantest.MainActivity"> 

    <Button 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:text="Scan Card" 
     android:onClick="onScanPress"/> 
    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Hello World!" /> 
</LinearLayout> 

버튼을 클릭하면 앞서 말한 경고가 Android 모니터에 쓰여지고 카메라를 사용하지 않고 건너 뛰고 대신 데이터 입력 양식이 표시됩니다.

무엇이 잘못 되었나요? 아마도 라이브러리 SDK가 필요한 라이브러리를 번들로 묶어 놓고 있지는 않지만 어디에서 체크 아웃 할 것인지조차 알지 못합니다.

SDK 내 SampleApp을 Android Studio 2.2.2로 가져 오면 동일한 결과가 나타납니다!

나는 card.io의 GitHub의 프로젝트에 두 가지 문제에 댓글을했습니다

답변

1

는 :

샘플 응용 프로그램은 모토 X 1 세대 장치에 괜찮 았는데.

내 장치에서 ÜBER이 올바르게 작동하기 때문에 라이브러리 버전을 다운 그레이드하려고 시도 했으므로 버전 5.4.0에서 올바르게 작동합니다. 그냥이 내 Gradle을 dependcies을 변경했다 :

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:24.1.1' 
    compile 'io.card:android-sdk:5.4.2' 
    testCompile 'junit:junit:4.12' 
} 
내가 GitHub의에 card.io의 이슈 트래커에이 피드백을 제공 할 것입니다

.

편집 : 버전 5.4.1에서도 잘 작동합니다!