мой код на классе FirstActivity
public class FirstActivity extends AppCompatActivity implements View.OnClickListener {
ImageButton btnStart, btnMoreApp;
private AdView adView;
private AlertDialog alertDialog;
StartAppAd startAppAd;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layout_first);
adView = (AdView) findViewById(R.id.adView);
startAppAd = new StartAppAd(this);
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);
//ad startApp
StartAppSDK.init(this, "106697618", "200046203", true);
/** Create Splash Ad **/
StartAppAd.showSplash(this, savedInstanceState,
new SplashConfig()
.setTheme(SplashConfig.Theme.GLOOMY)
.setLogo(R.drawable.ic_launcher)
.setAppName("Photo Frame")
);
btnStart = (ImageButton) findViewById(R.id.btn_start);
btnMoreApp = (ImageButton) findViewById(R.id.btn_more_app);
btnStart.setOnClickListener(this);
btnMoreApp.setOnClickListener(this);
}
}
...
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services-ads:8.4.0'
}
отправьте свой код –
Просто удалите файлы .idea из проекта. И снова импортируйте проект. И зайдите в: File> Invalidate Caches/Restart и выберите Invalidate and Restart и reupload project – viratpuar
Я сделал это, но не был. –