1

Hello I am trying to set up a simple google map application on my android studio.

My app keeps stopping when I try to run it. I followed YouTube videos as a guide and followed everything they said to do.

The first line in the code below kept complaining about other things not being in the same verison as 28.0.0-alpha3. So I added the next 3 lines and changed the version to 28.0.0-alpha3. I stopped getting errors so I run my app and it still stops working. I don't know how else to proceed.

implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support:support-media-compat:28.0.0-alpha3'
implementation 'com.android.support:animated-vector-drawable:28.0.0-alpha3'
implementation 'com.android.support:support-v4:28.0.0-alpha3'

Here is my complete app gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
    applicationId "com.example.zack.mynewproject"
    minSdkVersion 19
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support:support-media-compat:28.0.0-alpha3'
implementation 'com.android.support:animated-vector-drawable:28.0.0-alpha3'
implementation 'com.android.support:support-v4:28.0.0-alpha3'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

Here is the part of the log that shows up red

Logs

Thanks for the help guys

Eselfar
  • 3,759
  • 3
  • 23
  • 43
Zack
  • 11
  • 2
  • 1
    So it sounds like you did manage to get the build to work and the app can be launched. That's good, and the next thing to check is Logcat to see what the cause of the crash is. – Tim Biegeleisen Jul 09 '18 at 15:30
  • Is there any reason why you're targeting SDK 28, as it hasn't been released yet? If you're not trying Android P features, it's advisable to **not** use alpha versions and to target 27. – Eselfar Jul 09 '18 at 15:33
  • But as @TimBiegeleisen said, please post the logs for us to know what the error is – Eselfar Jul 09 '18 at 15:35
  • I am new to Android and app building, but when I set everything up by default the appcompat was 28.0.0-alpha3. I tried changing the target to other numbers, but it keeps telling me to match everything to 28.0.0-alpha 3. When I change things to 26.0.0 it says "This support library should not use a different version (26) than the compileSdkVersion (28)." I change my targetedSDKversion to 26 but I don't think it resolve the issue. I also get an error code when I try to sync the project with the gradle code after making the changes to 26.0.0. – Zack Jul 09 '18 at 16:00
  • Also I added the log. – Zack Jul 09 '18 at 16:02
  • It looks like your issue is similar to this one https://stackoverflow.com/q/30259141/1827254 Are you using any jar file or project dependency that you forgot to put in your Gradle? – Eselfar Jul 09 '18 at 16:49
  • Hm... I don't know what jar is and I don't have any project dependencies I believe. The code is the code that comes with the application. The code was barely changed at all. I started a new project with google maps and added the google maps API key. That was it. – Zack Jul 09 '18 at 17:43

0 Answers0