MobFox in Android - MobFoxView fails to instantiate -
i using mobfox android. have mobfoxview in 1 of layouts. runs fine when compile android 4.0.3. however, wanted try , build 2.0.1, , won't work.
on visual editor following error:
the following classes not instantiated: - (open class, show error log) see error log (window > show view) more details. tip: use view.isineditmode() in custom views skip code when shown in eclipse
in error log see:
com.mobfox.sdk.mobfoxview failed instantiate. java.lang.nullpointerexception @ com.mobfox.sdk.mobfoxview.<init>(mobfoxview.java:189) @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:39) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:27)
my mobfox view code is:
<com.mobfox.sdk.mobfoxview android:id="@+id/mobfoxview" android:layout_width="fill_parent" android:layout_height="50dp" mode="live" publisherid="..." />
i'm importing mobfox library through .jar file. runs fine when compiling android 4.0.3.
thank in advance
your minimum build version should version used build mobfox, couldn't see on web site without signing up. set target version (via project>properties or project.properties
) android-15
(or whatever), in android-manifest.xml
specify min sdk 6 (or whatever) , target sdk 15 (again, whatever). need careful limit min version android features.
assuming works , mobfox can used in lower version of android, decrease build api level , retest until fails in practice (imo) if want future proof should keep higher build api level , test against minimum.
note api 6
(2.0.1) has been marked obsolete , you'd better off targeting api 4
(android 1.6) or api 7
(2.2)
Comments
Post a Comment