java.lang.NullPointerException
at org.robovm.rt.bro.ValuedEnum$AsSignedIntMarshaler.toNative(ValuedEnum.java:103)
at org.robovm.apple.uikit.UIApplication.main(Native Method)
at org.robovm.apple.uikit.UIApplication.main(UIApplication.java:395)
at net.mwplay.iosbanding.IOSLauncher.main(IOSLauncher.java:35)
//use
bannerAdView = new BaiduMobSspBannerView(
BaiduMobSspAdViewType.BaiduMobSspAdViewTypeLargeBanner, this);
bannerAdView.setFrame(new CGRect(0, 350, 320, 50));
this.getView().addSubview(bannerAdView);
//The enum is
//typedef enum {
// BaiduMobSspAdViewTypeUnknown = 0, //error
// BaiduMobSspAdViewTypeNormalBanner = 1, //e.g. 320 * 50 ; 320 * 48... iphone banner
// BaiduMobSspAdViewTypeLargeBanner = 2, //e.g. 728 * 90 ; 768 * 110 ipad only
// BaiduMobSspAdViewTypeMediumBanner = 3, //e.g. 468 * 60 ; 508 * 80 ipad only
// BaiduMobSspAdViewTypeRectangle = 4, //e.g. 300 * 250; 320 * 270 ipad only
// BaiduMobSspAdViewTypeSky = 5, //Don't support
// BaiduMobSspAdViewTypeFullScreen = 6, //iphone full screen ad
// BaiduMobSspAdViewTypeVideo = 11, //iPad and iPhone use video ad
// BaiduMobSspAdViewTypeiPadNormalBanner = 8, //ipad full width banner
// BaiduMobSspAdViewTypeiPadFullScreen = 9, //ipad full screen ad e.g. 1024*768 ipad only
// BaiduMobSspAdViewTypeCustomSize = 10, //iPad and iPhone use custom size
// BaiduMobSspAdViewTypeSplash = 12, // IOS Splash Ad
// BaiduMobSspAdViewTypeiPhoneRectangle = 14,// iPhone 300*250
//} BaiduMobSspAdViewType;
@Marshaler(ValuedEnum.AsMachineSizedSIntMarshaler.class)
public enum BaiduMobSspAdViewType implements ValuedEnum{
BaiduMobSspAdViewTypeUnknown(0),
BaiduMobSspAdViewTypeNormalBanner(1),
BaiduMobSspAdViewTypeLargeBanner(2),
BaiduMobSspAdViewTypeBanner(3),
BaiduMobSspAdViewTypeRectangle(4),
BaiduMobSspAdViewTypeSky(5),
BaiduMobSspAdViewTypeFullScreen(6),
BaiduMobSspAdViewTypeVideo(11),
BaiduMobSspAdViewTypeiPadNormalBanner(8),
BaiduMobSspAdViewTypeiPadFullScreen(9),
BaiduMobSspAdViewTypeCustomSize(10),
BaiduMobSspAdViewTypeSplash(12),
BaiduMobSspAdViewTypeiPhoneRectangle(14);
private final long n;
private BaiduMobSspAdViewType(long n) {
this.n = n;
}
@Override
public long value() {
return n;
}
public static /*<name>*/BaiduMobSspAdViewType/*</name>*/ valueOf(long n) {
for (/*<name>*/BaiduMobSspAdViewType/*</name>*/ v : values()) {
if (v.n == n) {
return v;
}
}
throw new IllegalArgumentException("No constant with value " + n + " found in "
+ /*<name>*/BaiduMobSspAdViewType/*</name>*/.class.getName());
}
}