Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble building gradle on linux - error #20

Open
gree303 opened this issue Mar 2, 2022 · 3 comments
Open

Trouble building gradle on linux - error #20

gree303 opened this issue Mar 2, 2022 · 3 comments

Comments

@gree303
Copy link

gree303 commented Mar 2, 2022

I've tried all kind of configs.
Maybe one of you guys/girls do know the solution to my issue.

root build.gradle
`apply plugin: 'com.android.application'

android {
compileSdkVersion 10
buildToolsVersion '30.0.2'

defaultConfig {
    applicationId "com.obsidium.bettermanual"
    minSdkVersion 10
    targetSdkVersion 10
    versionCode 7
    versionName "1.5"
    archivesBaseName = "BetterManual-${versionName}"
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_6
    targetCompatibility JavaVersion.VERSION_1_6
}

}

repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}

dependencies {
compileOnly 'com.github.ma1co.OpenMemories-Framework:stubs:-SNAPSHOT'
implementation 'com.github.ma1co.OpenMemories-Framework:framework:-SNAPSHOT'
}
`

app/build.gradle (none of the commented worked out)
`buildscript {
repositories {
mavenCentral()
//google()
//gradlePluginPortal()
}
dependencies {
//classpath 'com.android.tools.build:gradle:4.1.0'
//classpath 'com.google.gms:google-services:4.3.3'
classpath "com.android.tools.build:gradle:4.1.2"

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects {
repositories {
//gradlePluginPortal()
//jcenter()
//google()
mavenCentral()
//mavenCentral { url 'https://maven.aliyun.com/repository/jcenter' }
//maven { url "https://jitpack.io" }
//maven { url 'http://repo1.maven.org/maven2' }
jcenter { url "http://jcenter.bintray.com/" }
}
}`

gradle.wrapper
#Thu Jun 24 20:15:04 EDT 2021 distributionBase=GRADLE_USER_HOME distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME

Terminal gradle --info
....Compiling build file '/home/user/Downloads/openmeories/BetterManual-master/build.gradle' using SubsetScriptTransformer.
Resource missing. [HTTP GET: https://repo1.maven.org/maven2/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom]
Resource missing. [HTTP HEAD: https://repo1.maven.org/maven2/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.jar]

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'BetterManual-master'.

Could not resolve all dependencies for configuration ':classpath'.
Could not find com.android.tools.build:gradle:4.1.2.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.jar
Required by:
project :

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 0.996 secs
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'BetterManual-master'.] from daemon DaemonInfo{pid=10042, address=[2094e9c2-0fdd-4b3a-92c4-2ddc3532f5a2 port:41411, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1646205025918, context=DefaultDaemonContext[uid=9c25e298-7d36-436d-a082-811908da0a24,javaHome=/usr/lib/jvm/java-8-openjdk-amd64,daemonRegistryDir=/root/.gradle/daemon,pid=10042,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).

Any help is very much welcome.
Thanks all

@gree303
Copy link
Author

gree303 commented Mar 11, 2022

Update: I managed to setup Android SDK and the project. But now I ran into dependency issues. I've tried several sources. All result in the same error - missing repo/dependencies.

I just wanted to change two digits within the source code to see if the overall system doesn't block/limit the values.
File: ManualActivity.java
Line: ~ 1403
changing the following lines...

//            m_bracketPicCount = 3;
//            m_bracketStep = 3;

... to ....

	      m_bracketPicCount = 9;
              m_bracketStep = 3;

In case anybody has this running could you send me the .apk?
This way I can test this...

Thanks.

@gree303
Copy link
Author

gree303 commented Mar 11, 2022

@obs1dium do you suggest any update to build.gradle config file(s) ? Not sure if I miss some important step or if it's just outdated in terms of dependencies? Any help is very much very welcome - thanks.

@obs1dium
Copy link
Owner

Sorry, it's been a while since I tried building this code. I've got a similar project that builds fine with Android Studio 2021.1.1, gradle 4.1.2 and SDK 25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants