2

When I try to import Google Play Downloader Library to use I get an error in this line of code:

import com.android.vending.expansion.downloader.R;

It says that this import cannot be resolved

Btw, at first when I imported the library I got a lot more errors I had to correct by removing res folder which was duplicated inside the original res folder, and renaming the packages from

src.com.google.android.vending.expansion.downloader

to

com.google.android.vending.expansion.downloader

I tried

import com.google.android.vending.expansion.downloader.R 

but I still get the same error

Hadi
  • 705
  • 8
  • 23
  • try with `Ctrl + shift + o` and then try again after `cleaning` the project. – Mohsin Naeem Oct 27 '12 at 16:43
  • It replaces the imported line with `import android.R` which I don't think this is right since it gives later in the code more errors in lines like `R.string.state_idle` that state_idle (or other strings) is not a field – Hadi Oct 27 '12 at 16:51
  • 1
    then your `.jar` file is not added in `Java build path`. chack is it added or not. `Project properties => Java Build Path => Order and Export` – Mohsin Naeem Oct 27 '12 at 16:55
  • What .jar file? I have only `android.jar` under Android 4.1.2 and `licensing_library.jar` under Android Dependencies – Hadi Oct 27 '12 at 17:00

1 Answers1

1

It seems I shouldn't have deleted the second res folder inside the original res folder... I should copy the files in the second res folder into the original res folder and then delete the (now empty) second res folder...

Thanks for your help...

Hadi
  • 705
  • 8
  • 23
  • 2
    Can you explain more what you mean by first and second res folder? I'm having the same issue, trying to get Android to run using expansion files – mcExchange Aug 30 '16 at 17:36