Question

I know that the problem has already been investigated before but the given solutions didn't work with me.

I Have an android project using some libraries. I added today the BaseGameUtils one. My problem : I can't build my project because it contains an error : Type R is already defined (error spotted in com.google.example.games.gamebaseutils)

I tried what everyone describes as a miracle solution : disabling Java builder then deleting the R file. The app launches but none of the changes made in my code are taken in count (normal, no java builder enabled...)

fyi, here is my packages list in gen folder :

com.vending.billing
>InAppBillingService.java

com.google.android.gms
>R.java

com.google.example.games.gamebaseutils
>R.java <=The error appears to be in this file

my.bundle.name
>R.java

Does someone have a real solution to fix that ?

Was it helpful?

Solution

I have solved this problem by changing the library's package name to another one, supposing that it was a R.java file path conflict problem between my imported libraries.

Everything works fine now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top