2013-10-23 6 views
2

새로운 RenderScript support library을 사용하는 프로젝트가 있고 난독 화를 위해 프로 가드도 사용하고 있습니다.Proguard + RenderScript 지원 라이브러리 오류

Proguard는 정상적인 RenderScript SDK (android.renderscript. *)를 사용할 때 코드에서 잘 작동합니다. 그리고이 코드는 proguard가 실행되지 않는 비 릴리스 빌드에서 컴파일 될 때 RenderScript 지원 라이브러리와 잘 작동합니다.

는하지만, 함께 두 가지를 가지고 그 결과는 이것이다 :

Warning: android.support.v8.renderscript.RenderScript: can't find referenced class android.os.SystemProperties 
Warning: android.support.v8.renderscript.RenderScript: can't find referenced class android.os.SystemProperties 
Warning: android.support.v8.renderscript.RenderScriptThunker: can't find referenced method 'android.renderscript.RenderScript create(android.content.Context,int)' in class android.renderscript.RenderScript 
     You should check if you need to specify additional program jars. 
Warning: there were 2 unresolved references to classes or interfaces. 
     You may need to specify additional library jars (using '-libraryjars'). 
Warning: there were 1 unresolved references to program class members. 
     Your input classes appear to be inconsistent. 
     You may need to recompile them and try again. 
     Alternatively, you may have to specify the option 
     '-dontskipnonpubliclibraryclassmembers'. 

나는 위험 할 수 난독 화에 대해 충분히 알고있다. 내가 배운 한 가지는 경고/오류 메시지의 제안이 반드시 문제의 실제 원인을 지적하지 않는 경향이 있다는 것입니다. 이번에는 변경 사항이 없습니다. 경고에 제안 된 변경 사항을 적용하면 결과가 변경되지 않습니다.

RendScript 지원 라이브러리를 proguard와 함께 사용할 수 있습니까? 그렇다면 내 프로 가드 구성에 추가해야 작동 할 수있는 마술이 있습니까?

답변

3

-dontwarn의 android.support.v8 ** 실제로이 어제 발생

...

+0

흥미로운 -. 그래서 때문에 숨겨진 API를 사용할 수 있나요? –

+0

아니요. 여기서 일어나는 일은 두 API가 적절한 API 레벨을 검사하여 실행되지 않도록 숨겨져 있다는 것입니다.하지만 이전 타겟 버전에서는 지원 라이브러리가 존재하지 않습니다. 우리는 또한 반사를 통해 간접적으로 그러한 방법을 얻을 수 있지만, 아직 그렇게하지 않았습니다. –