Search code examples
sdkintegrationinitstartapp

Android Startapp InAppPlus SDK crashes


My app is working fine on emulator and then I started to implement startapp sdk elements one by one. First I added the jar. Then I added permissions. Then I added their activities. Everything was fine. The app was still working. The next step was adding this code in onCreate method just before setContentView().

      StartAppAd.init(this, "developer id" , "app id");

I modified the line with my app id and developer id. And then I realised the app crashes. When I run my app it doesn't open and says unexpectedly closed. I checked the logcat .

It says ; Java.Lang.noClassDefFoundError: com.startapp.android.publish.StartappAd.

What is the problem?


Solution

  • I solved the problem. I deleted the jar and then bin file and then cleaned the project. The bin folder is automatically created again without the startapp jar. I also removed it by following Properties>Java Build Path. Then in this section i created a lib folder in project. Then i copied to jar in it. Then i added jar to the project.Now it works.As a result there is no need to add jar to lib folder in bin folder. A seperate lib folder is ok.