Vil
Vil

Reputation: 135

"com.google.zxing.client.android.CaptureActivity" not found and cannot be resolved

When following this tutorial, I have imported the library by putting this into gradle:

compile 'com.google.zxing:core:3.1.0'
compile 'com.google.zxing:android-integration:3.1.0'

However when I paste the Activity in the manifest e.g. :

<activity
   android:name="com.google.zxing.client.android.CaptureActivity"
   android:screenOrientation="landscape"
   android:configChanges="orientation|keyboardHidden"
   android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
   android:windowSoftInputMode="stateAlwaysHidden">
   <intent-filter>
      <action android:name="android.intent.action.MAIN"/>
      <category android:name="android.intent.category.DEFAULT"/>
   </intent-filter>
   <intent-filter>
      <action android:name="com.google.zxing.client.android.SCAN"/>
      <category android:name="android.intent.category.DEFAULT"/>
   </intent-filter>
</activity>

I get an error "com.google.zxing.client.android.CaptureActivity" not found and cannot be resolved. Has anyone else tried implementing this in AS?

Upvotes: 1

Views: 1889

Answers (2)

Rambo Zhu
Rambo Zhu

Reputation: 1

From the tutorial, clearly wrote that mark the android project as a Library after that add into your own project.

Upvotes: 0

Sean Owen
Sean Owen

Reputation: 66866

This class is not in core or android-integration. It's in android/, but this is not an artifact and not library to be embedded.

Upvotes: 1

Related Questions