ParticleTextView icon indicating copy to clipboard operation
ParticleTextView copied to clipboard

Issue importing

Open AndroidDeveloperLB opened this issue 8 years ago • 10 comments
trafficstars

I get this:

No service of type Factory available in ProjectScopeServices. Open File

image

AndroidDeveloperLB avatar May 27 '17 16:05 AndroidDeveloperLB

You don't have the appropriate plugins installed. Please use the following gradle code that works.

apply plugin: 'com.android.library'

version = "0.0.5"

ext {
    bintrayRepo = 'maven'
    bintrayName = 'ParticleTextView'

    publishedGroupId = 'com.yasic.library'
    libraryName = 'ParticleTextView'
    artifact = 'particleTextView'

    libraryDescription = ''

    siteUrl = 'https://github.com/Yasic/ParticleTextView'
    gitUrl = 'https://github.com/Yasic/ParticleTextView.git'

    libraryVersion = '0.0.4'

    developerId = 'yasic'
    developerName = 'yasic'
    developerEmail = '[email protected]'

    licenseName = 'The Apache Software License, Version 2.0'
    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
    allLicenses = ["Apache-2.0"]
}

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    resourcePrefix "yasic__"

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'io.reactivex:rxandroid:1.1.0'
}

If you are planning on submitting a PR, do not commit this custom Build file. The author of this repo uses it to upload the library to Maven. Instead, take a look at what I have done with PR #4 and proceed that way. Hope this helps!

rayliverified avatar May 27 '17 16:05 rayliverified

What exactly is missing that I need to download? Why the need to change gradle? Why not put it on the repo?

Also, after putting the above text in gradle file, I still have a build error:

Error:resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found Error:failed linking references Error:java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.AaptException: AAPT2 link failed: Error:com.android.builder.internal.aapt.AaptException: AAPT2 link failed: Error:Execution failed for task ':app:processDebugResources'.

Failed to execute aapt

image

AndroidDeveloperLB avatar May 27 '17 17:05 AndroidDeveloperLB

Most of the code in the Gradle file is for uploading the library to Maven. The author needs that code as part of the library.

What version of Build tools are you using?

rayliverified avatar May 27 '17 20:05 rayliverified

It says I have 26.0.0 rc2 , and many before.

AndroidDeveloperLB avatar May 27 '17 21:05 AndroidDeveloperLB

Try 25.0.2 to see if that works. Also, make sure to change the build tools and SDK version in the sample app folder as well. If all else fails, try downloading my fork. It has quite a few enhancements!

rayliverified avatar May 28 '17 02:05 rayliverified

@searchy2 Hi. I am sorry that I was working on another project recently so that I didn't see the notification. I have merged your pr just now and I am reviewing the code.

Yasic avatar May 28 '17 03:05 Yasic

@AndroidDeveloperLB I have update the build.gradle file and I think it should be work now. Please try it again.

Yasic avatar May 28 '17 04:05 Yasic

@Yasic Great library, thanks for the merge! There's still work to be done however. If the code looks good and passes your tests, it will need to be copied over to the Particle Surfaces class.

rayliverified avatar May 28 '17 05:05 rayliverified

@Yasic I've cloned the project . Now it works, but the "Sureface View Demo" is quite slow, espeically when trying to exit it.

AndroidDeveloperLB avatar May 28 '17 10:05 AndroidDeveloperLB

@Yasic I've cloned the project . Now it works, but the "Sureface View Demo" is quite slow, espeically when trying to exit it.

The improvements made to the Particle View have not been added to the Particle Surface yet. Currently, I am not too sure what the Particle Surface is for? Maybe @Yasic can explain the use scenarios.

rayliverified avatar May 28 '17 15:05 rayliverified