android - Cordova inAppBrowser "ResourceType" type issue for release build -


i using cordova application , using inappbrowser plugin, before using plugin cordova build android --release command working after adding plugin showing error, if not giving --release working means in debug mode there no issue. error getting follow

    /users/mukesh/documents/code/teamworkcordova/xyz/platforms/android/src/org/apache/cordova/inappbrowser/inappbrowser.java:555: error: expected resource of type id [resourcetype]                 actionbuttoncontainer.setid(1);                                             ~ /users/mukesh/documents/code/teamworkcordova/xyz/platforms/android/src/org/apache/cordova/inappbrowser/inappbrowser.java:563: error: expected resource of type id [resourcetype]                 back.setid(2);                            ~ /users/mukesh/documents/code/teamworkcordova/xyz/platforms/android/src/org/apache/cordova/inappbrowser/inappbrowser.java:587: error: expected resource of type id [resourcetype]                 forward.setid(3);                               ~ /users/mukesh/documents/code/teamworkcordova/xyz/platforms/android/src/org/apache/cordova/inappbrowser/inappbrowser.java:610: error: expected resource of type id [resourcetype]                 edittext.setid(4);                                ~ /users/mukesh/documents/code/teamworkcordova/xyz/platforms/android/src/org/apache/cordova/inappbrowser/inappbrowser.java:633: error: expected resource of type id [resourcetype]                 close.setid(5);                             ~ /users/mukesh/documents/code/teamworkcordova/xyz/platforms/android/src/org/apache/cordova/inappbrowser/inappbrowser.java:679: error: expected resource of type id [resourcetype]                 inappwebview.setid(6);                                    ~     explanation issues of type "resourcetype":    ensures resource id's passed apis of right type;    example, calling resources.getcolor(r.string.name) wrong. 

the latest release of inappbrowser plugin has several "errors" android studio (version 1.4) complains when building release apk.

this on 1 of them.

the way found around issue modify content of inappbrowser.java

i changed every occurence of object.setid(int) object.setid(integer.valueof(int))

for example: inappwebview.setid(6) -> inappwebview.setid(integer.valueof(6))

everybody finds better (without manipulating source) solution welcome.


Comments