当我使用这个库时:
compile 'co.ronash.android:pushe-base:1.4.0'
Run Code Online (Sandbox Code Playgroud)
我在gradle中得到这个错误:
Failed to resolve: com.android.support:support-v4:26.0.2
Run Code Online (Sandbox Code Playgroud)
我无法解决它.
还有就是在那里库忽视的解决方案
'com.android.support:support-v4:26.0.2'从'co.ronash.android:pushe-base:1.4.0'?
因为我已经编译了一个较新版本的support-v4库.
我的所有依赖项代码都是gradle:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support:support-v4:26.+' //--> its ok and no problem
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'co.ronash.android:pushe-base:1.4.0' //--->this code is error Failed to resolve: com.android.support:support-v4:26.0.2
compile 'com.google.android.gms:play-services-gcm:11.0.4'
compile 'com.google.android.gms:play-services-location:11.0.4'
testCompile 'junit:junit:4.12'
}
Run Code Online (Sandbox Code Playgroud) 我想安装Fluke的Pushe插件,但出现此错误:
我什至将此行添加到本机导入:
import android.support.annotation.NonNull;
但得到同样的例外。
我该怎么做才能解决这个问题?
这是我的堆栈跟踪:
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
C:\Users\Elyas\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\pushe-1.0.0\android\src\main\java\co\ronash\pushe\flutter\PushePlugin.java:49: error: cannot find symbol
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
^
symbol: class NonNull
location: class PushePlugin
C:\Users\Elyas\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\pushe-1.0.0\android\src\main\java\co\ronash\pushe\flutter\PushePlugin.java:49: error: cannot find symbol
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
^
symbol: class NonNull
location: class PushePlugin
C:\Users\Elyas\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\pushe-1.0.0\android\src\main\java\co\ronash\pushe\flutter\PusheApplication.java:28: error: cannot find symbol
public void onNotificationReceived(@NonNull final NotificationData …Run Code Online (Sandbox Code Playgroud)