Import com.google.android.vending cannot be allowed in imported Android project

I just imported an android project, and when I try to start it, it gives me an error with the following importers

import com.google.android.vending.licensing.AESObfuscator; import com.google.android.vending.licensing.LicenseChecker; import com.google.android.vending.licensing.LicenseCheckerCallback; import com.google.android.vending.licensing.ServerManagedPolicy; 

Any help resolving this would be greatly appreciated.

+7
android android-lvl
source share
6 answers

You can view the steps of this link . It takes steps to add it to your Android project, regardless of your development environment. Eclipse will work fine.

These steps take some time and effort, but I have successfully done this before.

-one
source share

You get these errors because you did not import the licensing library.

Go to the folder where you downloaded the android-sdks file.

So, there are 2 things: I) Licensing Library and II) Trial Licensing Application

I) The licensing library is located in:

UserName / Android-SDKs / Advanced / Google / play_licensing / Library

II) An example licensing application is located in:

Username / android-sdks / optional / google / play_licensing / sample

OR

In Eclipse, File-> New β†’ Other ... β†’ Android Sample Project β†’ (select a target and click next) β†’ Google Play Licensing Library

Step 1:

In Eclipse, go to File-> New β†’ Other ... β†’ Android Project from the existing code β†’ (find the library, i.e. = username / android-sdks / extras / google / play_licensing / library)

Step 2:

After you import the library into Eclipse, right-click on the package and go to Properties β†’ Android. Make sure the "Is the library" checkbox is selected.

Step 3:

In Eclipse, File-> New β†’ Other ... β†’ Android Sample Project β†’ (select a target and click next) β†’ Google Play licensing library. By default, my package was named "play_licensing_sample".

Step 4:

Right-click on "play_licensing_sample" and go to "Properties" β†’ Android β†’ Add ... β†’ (select the licensing library u in step 2) β†’ Apply

You did it!

+8
source share

I encountered this problem when trying to set up an Android project for an APK extension file .

The following steps resolved this for me:

  • Add downloader_library for eclipse as "project from existing source" (it has errors)
  • Add eclipse licensing library as "project from an existing source"
  • Add a licensing library to the downloader_library project.

Screenshot showing working configuration

+5
source share

In android studio 2.2.3, I was able to fix the "com.google.android.vending.licensing package does not exist" Error:

  • Right-click the downloader_library module from the view of your project.
  • Select "Open Module Settings"
  • Select the Dependencies Tab
  • Click the plus sign +, then select β€œ3 Dependency Modules”
  • Select "market_licensing" and click "OK."

Original fix entry at https://kitefaster.com/2017/02/15/expansion-apk-files-android-studio/

+2
source share

It took me 2 days to solve this in my project 1) I found a folder here

2) created a folder here

3) copied files (except for the UTIL folder) here

enter image description here

0
source share

In Android studio you need to add a folder of the same level as java (folder) called aidl. Take a look at the image more specifically.

You can get this file here - https://android.googlesource.com/platform/development.git/+/b8168f27f6f5b6b0ced5ef3210c0e89e8d3a5ae2/samples/MarketLicensing/src/com/android/vending/licensing

enter image description here

0
source share

All Articles