I create a game on buildbox I export the project but I can\'t start the game on android studio My problem is that I can\'t run the application or produce an apk file
<
This is because your support library is conflicted. You should always use the same version code for compileSdkVersion, buildToolsVersion, targetSdkVersion, and support library.
You should not using a jar file with
compile files('libs/support-v4-19.0.1.jar')
Instead you need to use support library that matching with your compileSdkVersion like this:
implementation 'com.android.support:support-v4:27.1.0'
You also need to use an exact version of play service and make sure you are using specific individual API. Not like this:
compile 'com.google.android.gms:play-services:+'
But something like this:
// if you're using only ads
implementation 'com.google.android.gms:play-services-ads:12.0.0'
this will make your method count small and then you can remove the multidex.
In the end, your build.gradle should be something like this:
android {
compileSdkVersion 27
buildToolsVersion '27.0.1'
defaultConfig {
applicationId "com.drh.bird"
minSdkVersion 14
targetSdkVersion 27
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
compileOptions.encoding = 'ISO-8859-1'
//multiDexEnabled = true
ndk {
moduleName "player_shared"
}
}
android {
useLibrary 'org.apache.http.legacy'
}
sourceSets {
main {
jni.srcDirs = []
}
}
buildTypes {}
android {
defaultConfig {
//multiDexEnabled true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
//compile 'com.android.support:multidex:1.0.1'
implementation 'com.google.android.gms:play-services:play-services-ads:12.0.0'
implementation 'com.android.support:support-v4:27.1.0'
compile files('libs/dagger-1.2.2.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
//compile files('libs/support-v4-19.0.1.jar')
}