我需要在我的代码中使用Label和EventDispatcher类,并通过互联网搜索我发现它们可以在google devtools中找到,但是,Eclipse和Android Studio都无法解析此库。我的Google Repository和Google Play服务最新。无法找到解决方案,Android编码的新手,帮助?
$scope.search = function(){
console.log($scope.testsForSearch.tests);
$scope.testsForSearch.tests.forEach(function(test){
if(test.name.search($scope.searchInput)){
$scope.tests.push(test);
}
});
}
错误说,"无法解析符号' devtools'"?
答案 0 :(得分:0)
请确保您的导入如下,可能是某些错误的导入,这就是您遇到此问题的原因。
import com.google.devtools.simple.runtime.components.android.Button;
import com.google.devtools.simple.runtime.components.Component;
import com.google.devtools.simple.runtime.components.HandlesEventDispatching;
import com.google.devtools.simple.runtime.components.android.Form;
import com.google.devtools.simple.runtime.components.android.HorizontalArrangement;
import com.google.devtools.simple.runtime.components.android.Label;
import com.google.devtools.simple.runtime.events.EventDispatcher;
答案 1 :(得分:0)
知道了,我没有" libSimpleAndroidRuntime.jar"文件添加到项目中的libs中。一旦我添加它,一切进展顺利。