Guest User

Untitled

a guest
Jun 19th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. android:name = ".MyApplication"
  2.  
  3. apply plugin: 'com.android.application'
  4. android {
  5. compileSdkVersion 25
  6. buildToolsVersion '27.0.3'
  7. defaultConfig {
  8. applicationId "example.igeniy"
  9. minSdkVersion 15
  10. targetSdkVersion 25
  11. versionCode 1
  12. versionName "1.0"
  13. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  14. // Enabling multidex support.
  15. multiDexEnabled true
  16. }
  17. buildTypes {
  18. release {
  19. minifyEnabled false
  20. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  21. }
  22. }
  23. sourceSets {
  24. main { assets.srcDirs = ['src/main/assets', 'src/main/assets/fonts', 'src/main/res/raw'] }
  25. }
  26. dependencies {
  27. androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
  28. exclude group: 'com.android.support', module: 'support-annotations'
  29. })
  30. testImplementation 'junit:junit:4.12'
  31. implementation 'com.android.support:appcompat-v7:25.4.0'
  32. implementation 'com.android.support.constraint:constraint-layout:1.1.2'
  33. implementation 'com.android.support:percent:25.4.0'
  34. //compile 'com.google.android.gms:play-services:10.2.0'
  35.  
  36. }
  37. repositories {
  38. flatDir {
  39. dirs 'libs'
  40. }
  41. }
  42. dependencies {
  43. implementation project(':vksdk_library')
  44. }
  45. compileOptions {
  46. }
  47. productFlavors {
  48. }
  49. }
  50.  
  51. java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{example.igeniy/example.igeniy.SplashScreen}: java.lang.ClassNotFoundException: example.igeniy.SplashScreen
  52.  
  53. <?xml version="1.0" encoding="utf-8"?>
  54.  
  55. <uses-permission android:name="android.permission.INTERNET" />
  56. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  57. <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  58.  
  59. <application
  60. android:name = ".MyApplication"
  61. android:allowBackup="true"
  62. android:icon="@mipmap/ic_launcher"
  63. android:label="@string/app_name"
  64. android:supportsRtl="true"
  65. android:theme="@style/Theme.AppCompat.Light.NoActionBar">
  66.  
  67. <activity
  68. android:name=".SplashScreen"
  69. android:theme="@style/SplashTheme">
  70. <intent-filter>
  71. <action android:name="android.intent.action.MAIN" />
  72. <category android:name="android.intent.category.LAUNCHER" />
  73. </intent-filter>
  74. </activity>
  75.  
  76. <activity android:name=".StartActivity"/>
  77.  
  78. <activity android:name=".Menu"/>
  79.  
  80. <activity android:name=".RecordList"/>
  81.  
  82. </application>
  83.  
  84. public class SplashScreen extends AppCompatActivity {
  85. static MediaPlayer mediaPlayer;
  86. boolean flag;
  87.  
  88.  
  89.  
  90. @Override
  91. protected void onCreate (@Nullable Bundle savedInstanceState){
  92. super.onCreate(savedInstanceState);
  93. mediaPlayer = MediaPlayer.create(this, R.raw.acdc);
  94. mediaPlayer.start();
  95.  
  96. try{
  97. Thread.sleep(1000);
  98. }
  99. catch(InterruptedException e){
  100. }
  101. flag = true;
  102. Intent intent = new Intent();
  103. intent.setClass(this, StartActivity.class);
  104. startActivity(intent);
  105. }
  106.  
  107. @Override
  108. protected void onRestart() {
  109. finish();
  110. super.onRestart();
  111.  
  112. }
  113.  
  114. }
Add Comment
Please, Sign In to add comment