Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- android:name = ".MyApplication"
- apply plugin: 'com.android.application'
- android {
- compileSdkVersion 25
- buildToolsVersion '27.0.3'
- defaultConfig {
- applicationId "example.igeniy"
- minSdkVersion 15
- targetSdkVersion 25
- versionCode 1
- versionName "1.0"
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- // Enabling multidex support.
- multiDexEnabled true
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- sourceSets {
- main { assets.srcDirs = ['src/main/assets', 'src/main/assets/fonts', 'src/main/res/raw'] }
- }
- dependencies {
- androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
- exclude group: 'com.android.support', module: 'support-annotations'
- })
- testImplementation 'junit:junit:4.12'
- implementation 'com.android.support:appcompat-v7:25.4.0'
- implementation 'com.android.support.constraint:constraint-layout:1.1.2'
- implementation 'com.android.support:percent:25.4.0'
- //compile 'com.google.android.gms:play-services:10.2.0'
- }
- repositories {
- flatDir {
- dirs 'libs'
- }
- }
- dependencies {
- implementation project(':vksdk_library')
- }
- compileOptions {
- }
- productFlavors {
- }
- }
- java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{example.igeniy/example.igeniy.SplashScreen}: java.lang.ClassNotFoundException: example.igeniy.SplashScreen
- <?xml version="1.0" encoding="utf-8"?>
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
- <application
- android:name = ".MyApplication"
- android:allowBackup="true"
- android:icon="@mipmap/ic_launcher"
- android:label="@string/app_name"
- android:supportsRtl="true"
- android:theme="@style/Theme.AppCompat.Light.NoActionBar">
- <activity
- android:name=".SplashScreen"
- android:theme="@style/SplashTheme">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- <activity android:name=".StartActivity"/>
- <activity android:name=".Menu"/>
- <activity android:name=".RecordList"/>
- </application>
- public class SplashScreen extends AppCompatActivity {
- static MediaPlayer mediaPlayer;
- boolean flag;
- @Override
- protected void onCreate (@Nullable Bundle savedInstanceState){
- super.onCreate(savedInstanceState);
- mediaPlayer = MediaPlayer.create(this, R.raw.acdc);
- mediaPlayer.start();
- try{
- Thread.sleep(1000);
- }
- catch(InterruptedException e){
- }
- flag = true;
- Intent intent = new Intent();
- intent.setClass(this, StartActivity.class);
- startActivity(intent);
- }
- @Override
- protected void onRestart() {
- finish();
- super.onRestart();
- }
- }
Add Comment
Please, Sign In to add comment