스마트기기개발관련/안드로이드 개발

android || In-app billing - error in generated IInAppBillingService.java - 빌드시 'gen' 에서 IInAppBillingService 관련 오류가 날때

AlrepondTech 2020. 9. 22. 18:56
반응형

 

 

 

 

=================================

=================================

=================================

 

 

 

 

 

 

 

 

 

출처: http://stackoverflow.com/questions/15174385/in-app-billing-error-in-generated-iinappbillingservice-java

 

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

In-app billing - error in generated IInAppBillingService.java

Trying to use in-app billing V3 for the first time, targeting Android 2.2 (API level 8), using Eclipse.
Created a package (in /src) called com.android.vending.billing, dropped (imported) IInAppBillingService.aidl into it. But /gen now contains build errors, eg for
it says "The method isBillingSupported(int, String, String) of type IInAppBillingService.Stub.Proxy must override a superclass method ... ".
It recommends I remove the @override but this is a google supplied file and I don't want to change it. What's gone wrong?
Cleaning and rebuilding doesn't help.
android in-app-billing
 

1 Answer

activeoldestvotes

You will get this error if you are using Java 5. Java 5 has a few problems with the @Overrideannotation.
You need to make sure you jave Java 6 installed, and then you can change the version used for building by going to Project -> Properties -> Java Compiler and checking the Enable project specific settings box and changing the Compiler compliance level: value to 1.6
Android Tools don't play nice with Java 7, so don't use 1.7.
 

 

 

=================================

=================================

=================================

 

 

관련해설 출처: 202psj.tistory.com (여기)

 

- IInAppBillingService 관련에러가 날때 프로젝트에 속성에 들어가 아래와 같이 버전을 확인해 본다

 

 

 

- 1.5 로 되어있으면 아래와 같이 적정히 쓸수 있는 1.6으로 바꾸어준다 추후 다음버전이 안정되어 쓸수 있게되면 1.7, 1.8으로 바꾸어

   주어도 된다.

 

 

- 이와같이 바꾸어주면 'gen' 폴더 에러로 IInAppBillingService 관련 에러가 났던부분이 해결될 것 이다.

 

 

=================================

=================================

=================================

 

 

 

반응형