Could not find com.huawei.agconnect:agcp:1.0.0.300.
Searched in the following locations:
- https://jcenter.bintray.com/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.pom
- https://jcenter.bintray.com/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.jar
- https://dl.google.com/dl/android/maven2/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.pom
- https://dl.google.com/dl/android/maven2/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.jar
Required by:
project :
I am following this document but still facing issue.
https://developer.huawei.com/consumer/en/codelab/HMSAnalyticsKit/index.html#2
Can anyone help?
Looks like you are missed to add application gradle configurations.
Try after adding these lines on your gradle file
buildscript {
repositories {
maven { url 'http://developer.huawei.com/repo/' }
}
dependencies {
classpath 'com.huawei.agconnect:agcp:1.2.0.300'
}
}
allprojects {
repositories {
maven { url 'http://developer.huawei.com/repo/' }
}
}
Though your environment is built based on the codelab of Analytics Kit, but the AppGallery Connect plug-in is not configured correctly, so you cannot find it. Configure it by referring to the guide at the link.
Make sure to use the current version; it's more alike this:
buildscript {
repositories {
google()
mavenCentral()
maven { url "https://developer.huawei.com/repo/" }
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.2"
classpath "com.huawei.agconnect:agcp:1.6.0.300"
}
}
Related
I'd like to detect the presence of a plugin from within the Eclipse plugin I'm maintaining. From a few other questions asked on this subject it looks like this is difficult.
The plugin I'm looking to detect provides a view. As such the following works, but I'm hoping that a prettier option exists:
public static boolean internalPluginInstalled() {
IExtensionRegistry reg = Platform.getExtensionRegistry();
IExtensionPoint point = reg.getExtensionPoint("org.eclipse.ui.views");
IExtension[] extensions = point.getExtensions();
for(IExtension extension : extensions) {
IConfigurationElement[] configs = extension.getConfigurationElements();
for (IConfigurationElement config : configs) {
if (config.getName().equals("view") && config.getAttribute("id").equals("view.id.goes.here")) {
return true;
}
}
}
return false;
}
Use Platform.getBundle (org.eclipse.core.runtime.Platform):
Bundle bundle = Platform.getBundle("plugin id");
bundle will be non-null if the plug-in is installed.
bundle.getState() returns you the exact state of the plug-in - Bundle.ACTIVE if the plug-in has been started.
I'm creating a Multibranch Pipeline job with JobDSL , and I want to specify my github url , but it's not working.
The job which I created it display "https://github.com/jackson/multibranch-Pipeline.git" ,
not https://mycompanygithub.com/jackson/multibranch-Pipeline.git
Any idea how theses other parameters can be added in ?
or other solution
multibranchPipelineJob('Jenkins/Multibranch-Pipeline/GitHub_Basic') {
branchSources {
branchSource {
source {
github {
repositoryUrl('https://mycompanygithub.com')
credentialsId('mycredentialsid')
repoOwner('jackson')
repository('multibranch-Pipeline.git')
configuredByUrl(true)
}
}
}
}
}
Actually your configuration is correct, your are just missing one parameter: apiUri
// The server to connect to.
apiUri(String value)
Without it, it takes the default github.com as the base domain for the repository regardless of what is configured in the repositoryUrl parameter.
Try the following:
multibranchPipelineJob('Jenkins/Multibranch-Pipeline/GitHub_Basic') {
branchSources {
branchSource {
source {
github {
apiUri('https://mycompanygithub.com/api/v3')
repositoryUrl('https://mycompanygithub.com')
credentialsId('mycredentialsid')
repoOwner('jackson')
repository('multibranch-Pipeline.git')
configuredByUrl(true)
}
}
}
}
}
By the way you can see the full documentation of the Job DSL of this plugin at the following URL on your own Jenkins server:
YOUR_JENKINS_URL/plugin/job-dsl/api-viewer/index.html#method/javaposse.jobdsl.dsl.DslFactory.multibranchPipelineJob
I am trying to publish a package on Github using the Gradle part in Android Studio. It is not my first one but I cannot find what the difference is to the previous ones and why I get this error.
I can successfully run the build step and the files are in the output folder. However, when I run the step "publish", I get the following error:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task
':config_properties_reader_android:publishBarPublicationToGitHubPackagesRepository'.
Failed to publish publication 'bar' to repository 'GitHubPackages'
-> Username must not be null!
The only difference I could find was that my module folder with the files to publish contains three instead of the usual two files:
Those two I would expect:
config_properties_reader_android/build/outputs/aar/config_properties_reader_android-debug.aar
config_properties_reader_android/build/outputs/aar/config_properties_reader_android-release.aar
And this one seems odd:
config_properties_reader_android/build/outputs/aar/configpropertiesreader-debug.aar
My gradle file looks like this:
apply plugin: 'maven-publish'
def githubProperties = new Properties()
githubProperties.load(new FileInputStream(rootProject.file("github.properties")))
def getVersionName = { ->
return "1.0.0"
}
def getArtificatId = { ->
return "config_properties_reader_android"
}
publishing {
publications {
bar(MavenPublication) {g
groupId 'com.MyGithubRepo'
artifactId getArtificatId()
version getVersionName()
artifact("$buildDir/outputs/aar/${getArtificatId()}-release.aar")
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/MyGithubRepo/ConfigPropertiesReader.Android")
credentials {
username = githubProperties['gpr.usr'] ?: System.getenv("GPR_USER")
password = githubProperties['gpr.key'] ?: System.getenv("GPR_API_KEY")
}
}
}
}
And my github.properties file also contains the usual:
gpr.user=myUser
gpr.key=myKey
Could the third file in the ouput folder be the problem? I do not see how the username should have anything to do with it but I have no idea where to look in order to find the error.
Try this in github.properties file
gpr.usr=myUser
gpr.key=myKey
Change gpr.user => gpr.usr
Also, use your git user-id in gpr.usr
and use git personal access token in gpr.key
i also have this issue this change solve mine problem
check the below line and replace the username and password it will work
file name is build.gradle
maven {
url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
credentials {
username 'braintree_team_sdk'
password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
}
}
I want to test my own app before going live after integrating with Huawei install Referrer SDK. I followed all the steps found in codelabs and the documentations and when i install the apk on the device , getInstallReferrer method throws IOException. This is my code. What is it that i am doing wrong ?. how can i get installReferrer info for testing purposes ?
Runnable {
referrerClient = newBuilder(context).setTest(true).build()
referrerClient.startConnection(object : InstallReferrerStateListener {
#SuppressLint("SwitchIntDef")
override fun onInstallReferrerSetupFinished(responseCode: Int) {
when (responseCode) {
InstallReferrerClient.InstallReferrerResponse.OK -> {
// Connection established.
try {
val response: ReferrerDetails = referrerClient.installReferrer
val referrerUrl: String = response.installReferrer
val referrerClickTime: Long = response.referrerClickTimestampSeconds
val appInstallTime: Long = response.installBeginTimestampSeconds
}catch (e : IOException){
Log.i("INSTALL_REFERRER","IOException")
}
catch(e: RemoteException){
Log.i("INSTALL_REFERRER","RemoteException")
}
finally {
referrerClient.endConnection()
}
}
InstallReferrerClient.InstallReferrerResponse.FEATURE_NOT_SUPPORTED -> {
Log.i("INSTALL_REFERRER","NOT AVAILABLE")
}
InstallReferrerClient.InstallReferrerResponse.SERVICE_UNAVAILABLE -> {
Log.i("INSTALL_REFERRER","SERVICE UNAVAILABLE")
}
}
}
override fun onInstallReferrerServiceDisconnected() {
Log.i("INSTALL_REFERRER","ReferrerServiceDisconnected")
}
})
}.run()
Please check whether the AIDL interface is added.
Check the screenshot below:
Obtain Install Referrer Information by AIDL
You can call an AIDL API provided by HUAWEI Ads Kit to obtain install referrer information from HUAWEI devices, without integrating any HUAWEI SDK. The install referrer information obtained from a device in either mode (SDK or AIDL) is the same.
Call Process
The Development Procedure is as follows
Create an AIDL file for the IPPSChannelInfoService API and save the file.
Copy the following content to the AIDL file:
package com.huawei.android.hms.ppskit;
/** Important: Do not change the method sequence in the AIDL file. */
interface IPPSChannelInfoService {
String getChannelInfo();
}
Change Build Action to AndroidInterfaceDescription of AIDL file.
Rebuild project.
Create a class to implement Android-native IServiceConnection.
For more details, see docs.
Also, please kindly refer to the demo.
Update:
The package name needs to be specified because setTest(true)
if (this.isTest){
var2 = "com.huawei.pps.hms.test";
}
The empty check on ReferrerDetails can be added.
if (null != referrerDetails && null != mCallback)
Is it possible to conditionally upload jars to artifactory?
I have tried using the Artifactory plugin but that works fine if the case is just to upload a single jar from a build pipeline.
If I also want to upload a test jar, how would that go?
Can I have some configuration specifying which jar should be uploaded? e.g. test jar or the "normal" jar file
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
artifactory {
clientConfig.setIncludeEnvVars(true)
contextUrl = 'https://localhost:8081/artifactory/'
publish {
repository {
repoKey = 'libs-release-local'
username = "${artifactory_user}"
password = "${artifactory_user_password}"
}
defaults {
publications('mavenJava')
publishArtifacts = true
publishPom = true
publishIvy = true
}
}
resolve {
contextUrl = 'https://localhost:8081/artifactory'
repository {
repoKey = 'libs-release-local'
username = "${artifactory_user"
password = "${artifactory_user_password}"
maven = true
}
}
}
To publish classes from your test SourceSet (src/test/ by default), you first need to define a task to create the testJar:
task testJar(type: Jar) {
classifier = 'tests'
from sourceSets.test.output
}
Then add it to your publications
publications {
mavenJava(MavenPublication) {
from components.java
artifact testJar {
classifier "test"
}
}
}
Since you're already publishing publications('mavenJava') from artifactory, you do not have to make any changes there.